authrocket 2.0.3 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/LICENSE +1 -1
- data/lib/authrocket/api/version.rb +1 -1
- data/lib/authrocket/auth_provider.rb +10 -2
- data/lib/authrocket/user_token.rb +1 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37f37dc00fd966b7ee4a814d96dd74887ad28766
|
4
|
+
data.tar.gz: d1c970139d94933366d970465d55945192645dc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40969c9aba8cb99c074179f23fb14cb57f7594acecb9e25e6e45511a4c5d4c916f3d92e82571ee9181ffcb00816d54b201ccb1114c7ef8e14b36d0bf47765c9f
|
7
|
+
data.tar.gz: b39524bbbfb598427910fd665598e77d1b0307465c90b5d0cebb67b876380fc4505e6fd8dea4c6f80df381edb75e76bc179b73eb3f38b2a1bb7e4712467c1b0a
|
data/CHANGELOG.md
CHANGED
data/LICENSE
CHANGED
@@ -50,7 +50,11 @@ module AuthRocket
|
|
50
50
|
def self.authorize(attribs={})
|
51
51
|
params = parse_request_params(attribs)
|
52
52
|
parsed, creds = request(:post, url+'/authorize', params)
|
53
|
-
|
53
|
+
if parsed[:data][:object] == 'user_token'
|
54
|
+
UserToken.new(parsed, creds)
|
55
|
+
else
|
56
|
+
User.new(parsed, creds)
|
57
|
+
end
|
54
58
|
end
|
55
59
|
|
56
60
|
# attribs - :access_token - required
|
@@ -58,7 +62,11 @@ module AuthRocket
|
|
58
62
|
def authorize_token(attribs={})
|
59
63
|
params = parse_request_params(attribs)
|
60
64
|
parsed, creds = request(:post, url+'/authorize', params)
|
61
|
-
|
65
|
+
if parsed[:data][:object] == 'user_token'
|
66
|
+
UserToken.new(parsed, creds)
|
67
|
+
else
|
68
|
+
User.new(parsed, creds)
|
69
|
+
end
|
62
70
|
end
|
63
71
|
|
64
72
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authrocket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AuthRocket Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ncore
|