omniauth-campus 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d61b4d1bcc51de8749c20cecdc0bd617eb527ae9
|
4
|
+
data.tar.gz: de1664a6603236f29b5220ef4af39ca266807bab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83c7b5f71e720833372a7f20ebd3bd3f7c84a4f4a0e5819b9bbd42972abb38cc23148ee863050f224d1e7f9099819aabb502ea052a5022171690211d57f370de
|
7
|
+
data.tar.gz: 9e790a4095aa4e48c3754b525e6d0393c048be46d7a7e00e68b831ae59ecd51cd948b6ca205fd54b16205735b4fc6a988303f42133f6f54eb53b740287823c38
|
Binary file
|
Binary file
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'oauth'
|
2
2
|
#require 'oauth'
|
3
3
|
require 'omniauth'
|
4
4
|
require 'multi_json'
|
@@ -18,12 +18,13 @@ module OmniAuth
|
|
18
18
|
include OmniAuth::Strategy
|
19
19
|
|
20
20
|
option :name, 'campus'
|
21
|
-
args [:
|
21
|
+
args [:consumer_key, :consumer_secret]
|
22
22
|
#option :consumer_key, "YzjVHuk8xoXCTcNwYg57yiCW5w59tucC"
|
23
23
|
#option :consumer_secret, "ZDrWuDsunNkRroU5psb6QyMmT86XkYST"
|
24
24
|
option :client_options, {
|
25
|
-
|
26
|
-
|
25
|
+
access_token_path: '/oauth/access_token',
|
26
|
+
authorize_path: '/oauth/authorize',
|
27
|
+
request_token_path: '/oauth/request_token',
|
27
28
|
site: 'http://vistacampus.org'
|
28
29
|
}
|
29
30
|
|
@@ -62,32 +63,9 @@ module OmniAuth
|
|
62
63
|
}
|
63
64
|
end
|
64
65
|
|
65
|
-
def callback_url
|
66
|
-
options.authorize_params.callback_url or super
|
67
|
-
end
|
68
|
-
|
69
|
-
def request_phase
|
70
|
-
redirect client.auth_code.authorize_url({:redirect_uri => callback_url}.merge(options.authorize_params))
|
71
|
-
end
|
72
|
-
|
73
66
|
def raw_info
|
74
|
-
@raw_info ||= access_token.get('/
|
75
|
-
|
76
|
-
raise ::Timeout::Error
|
77
|
-
end
|
78
|
-
|
79
|
-
def build_access_token
|
80
|
-
token_params = options.token_params.merge({
|
81
|
-
code: request.params['code'],
|
82
|
-
redirect_uri: callback_url,
|
83
|
-
client_id: client.id,
|
84
|
-
client_secret: client.secret
|
85
|
-
})
|
86
|
-
|
87
|
-
client.get_token(token_params, deep_symbolize(options.auth_token_params))
|
88
|
-
end
|
89
|
-
|
90
|
-
|
67
|
+
@raw_info ||= MultiJson.decode( access_token.get('/users/me').body )["users"].first
|
68
|
+
end
|
91
69
|
|
92
70
|
end
|
93
71
|
end
|
Binary file
|
data/omniauth-campus.gemspec
CHANGED
@@ -20,8 +20,8 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.3"
|
22
22
|
spec.add_development_dependency "rake"
|
23
|
-
|
24
|
-
spec.add_runtime_dependency 'omniauth-oauth2', '~> 1.1.1'
|
23
|
+
spec.add_runtime_dependency 'omniauth', '~> 1.0'
|
24
|
+
#spec.add_runtime_dependency 'omniauth-oauth2', '~> 1.1.1'
|
25
25
|
spec.add_runtime_dependency 'oauth'
|
26
26
|
#spec.add_dependency 'oauth2', '~> 0.8.0'
|
27
27
|
spec.add_dependency 'faraday', ['>= 0.8', '<0.10']
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-campus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- johnvehr
|
@@ -39,19 +39,19 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: omniauth
|
42
|
+
name: omniauth
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: '1.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: '1.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: oauth
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|