omniauth-flickr 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +10 -0
- data/lib/omniauth-flickr/version.rb +1 -1
- data/lib/omniauth/strategies/flickr.rb +8 -0
- metadata +49 -28
data/README.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
An Omniauth 1.0 Strategy for Flickr
|
|
2
2
|
|
|
3
|
+
For more information see the following:
|
|
4
|
+
|
|
5
|
+
* https://github.com/intridea/omniauth/wiki/List-of-Strategies
|
|
6
|
+
|
|
7
|
+
Release notes:
|
|
8
|
+
|
|
9
|
+
* Version 0.0.7
|
|
10
|
+
|
|
11
|
+
- Documentation and comment change only
|
|
12
|
+
|
|
3
13
|
* Version 0.0.6
|
|
4
14
|
|
|
5
15
|
- Comply more closely to published Auth Hash Schema
|
|
@@ -3,6 +3,9 @@ require 'multi_json'
|
|
|
3
3
|
|
|
4
4
|
module OmniAuth
|
|
5
5
|
module Strategies
|
|
6
|
+
|
|
7
|
+
# An omniauth 1.0 strategy for Flickr authentication
|
|
8
|
+
# Based on http://www.flickr.com/services/api/auth.oauth.html
|
|
6
9
|
class Flickr < OmniAuth::Strategies::OAuth
|
|
7
10
|
|
|
8
11
|
option :name, 'flickr'
|
|
@@ -42,6 +45,9 @@ module OmniAuth
|
|
|
42
45
|
}
|
|
43
46
|
end
|
|
44
47
|
|
|
48
|
+
# Return info gathered from the flickr.people.getInfo API call
|
|
49
|
+
# (not authenticated) in its raw JSON form
|
|
50
|
+
|
|
45
51
|
def raw_info
|
|
46
52
|
# This is a public API and does not need signing or authentication
|
|
47
53
|
url = "/services/rest/?api_key=#{options.consumer_key}&format=json&method=flickr.people.getInfo&nojsoncallback=1&user_id=#{uid}"
|
|
@@ -49,6 +55,8 @@ module OmniAuth
|
|
|
49
55
|
rescue ::Errno::ETIMEDOUT
|
|
50
56
|
raise ::Timeout::Error
|
|
51
57
|
end
|
|
58
|
+
|
|
59
|
+
# Parse the "Person" portion of the raw_info JSON into a hash
|
|
52
60
|
|
|
53
61
|
def user_info
|
|
54
62
|
unless @user_info
|
metadata
CHANGED
|
@@ -1,34 +1,46 @@
|
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-flickr
|
|
3
|
-
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
prerelease: false
|
|
5
|
+
segments:
|
|
6
|
+
- 0
|
|
7
|
+
- 0
|
|
8
|
+
- 7
|
|
9
|
+
version: 0.0.7
|
|
6
10
|
platform: ruby
|
|
7
|
-
authors:
|
|
11
|
+
authors:
|
|
8
12
|
- Tim Breitkreutz
|
|
9
13
|
autorequire:
|
|
10
14
|
bindir: bin
|
|
11
15
|
cert_chain: []
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
|
|
17
|
+
date: 2011-12-05 00:00:00 -07:00
|
|
18
|
+
default_executable:
|
|
19
|
+
dependencies:
|
|
20
|
+
- !ruby/object:Gem::Dependency
|
|
15
21
|
name: omniauth-oauth
|
|
16
|
-
|
|
22
|
+
prerelease: false
|
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
|
17
24
|
none: false
|
|
18
|
-
requirements:
|
|
25
|
+
requirements:
|
|
19
26
|
- - ~>
|
|
20
|
-
- !ruby/object:Gem::Version
|
|
21
|
-
|
|
27
|
+
- !ruby/object:Gem::Version
|
|
28
|
+
segments:
|
|
29
|
+
- 1
|
|
30
|
+
- 0
|
|
31
|
+
version: "1.0"
|
|
22
32
|
type: :runtime
|
|
23
|
-
|
|
24
|
-
version_requirements: *70224083202000
|
|
33
|
+
version_requirements: *id001
|
|
25
34
|
description: OmniAuth strategy for Flickr
|
|
26
|
-
email:
|
|
35
|
+
email:
|
|
27
36
|
- tim@sbrew.com
|
|
28
37
|
executables: []
|
|
38
|
+
|
|
29
39
|
extensions: []
|
|
40
|
+
|
|
30
41
|
extra_rdoc_files: []
|
|
31
|
-
|
|
42
|
+
|
|
43
|
+
files:
|
|
32
44
|
- .gitignore
|
|
33
45
|
- Gemfile
|
|
34
46
|
- LICENSE
|
|
@@ -39,28 +51,37 @@ files:
|
|
|
39
51
|
- lib/omniauth-flickr/version.rb
|
|
40
52
|
- lib/omniauth/strategies/flickr.rb
|
|
41
53
|
- omniauth-flickr.gemspec
|
|
54
|
+
has_rdoc: true
|
|
42
55
|
homepage: https://github.com/timbreitkreutz/omniauth-flickr
|
|
43
56
|
licenses: []
|
|
57
|
+
|
|
44
58
|
post_install_message:
|
|
45
59
|
rdoc_options: []
|
|
46
|
-
|
|
60
|
+
|
|
61
|
+
require_paths:
|
|
47
62
|
- lib
|
|
48
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
|
63
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
49
64
|
none: false
|
|
50
|
-
requirements:
|
|
51
|
-
- -
|
|
52
|
-
- !ruby/object:Gem::Version
|
|
53
|
-
|
|
54
|
-
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
segments:
|
|
69
|
+
- 0
|
|
70
|
+
version: "0"
|
|
71
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
55
72
|
none: false
|
|
56
|
-
requirements:
|
|
57
|
-
- -
|
|
58
|
-
- !ruby/object:Gem::Version
|
|
59
|
-
|
|
73
|
+
requirements:
|
|
74
|
+
- - ">="
|
|
75
|
+
- !ruby/object:Gem::Version
|
|
76
|
+
segments:
|
|
77
|
+
- 0
|
|
78
|
+
version: "0"
|
|
60
79
|
requirements: []
|
|
80
|
+
|
|
61
81
|
rubyforge_project: omniauth-flickr
|
|
62
|
-
rubygems_version: 1.
|
|
82
|
+
rubygems_version: 1.3.7
|
|
63
83
|
signing_key:
|
|
64
84
|
specification_version: 3
|
|
65
85
|
summary: OmniAuth strategy for Flickr
|
|
66
86
|
test_files: []
|
|
87
|
+
|