oauth_token_verifier 0.1.1 → 0.1.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +28 -17
- data/lib/oauth_token_verifier/version.rb +1 -1
- data/lib/oauth_token_verifier.rb +1 -0
- data/oauth_token_verifier.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1245710353bc053bde80275e5b06bf168d2e604
|
4
|
+
data.tar.gz: f7e6a474b61e9c6d2a33de3e26de1ad7fc680012
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f395232a0f62eebb7ed13472861eb3fd8540e0ee503430a8bb6da09534743fc9cf2a530a4adc637a2aacde619c47d29ba4908934cda7a0b5643cea10399072e
|
7
|
+
data.tar.gz: 586209254abcb29dc9824f92a927abf5c8a9db7ceb3dfec824025457332942dfb5662025f6a9de4fd4cd425ef4193a55e05d064b36e3c1f972dff5651ad5fe5e
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -12,29 +12,41 @@ This library helps to verify oauth2 access tokens that have been obtained from t
|
|
12
12
|
|
13
13
|
```
|
14
14
|
OauthTokenVerifier.configure do |c|
|
15
|
+
...
|
16
|
+
end
|
17
|
+
```
|
18
|
+
|
19
|
+
You should configure enabled providers first, only three providers are supported by now
|
20
|
+
|
21
|
+
```
|
22
|
+
c.enabled_providers = [:google, :facebook, :vk]
|
23
|
+
```
|
24
|
+
|
25
|
+
then goes separate configuration for each provider
|
15
26
|
|
16
|
-
|
17
|
-
|
27
|
+
```
|
28
|
+
# provider name to be returned
|
29
|
+
c.facebook.name = 'facebook'
|
30
|
+
```
|
18
31
|
|
19
|
-
|
20
|
-
|
21
|
-
|
32
|
+
```
|
33
|
+
# id field - this used to uniquely identify user
|
34
|
+
c.facebook.id_field = 'id'
|
35
|
+
```
|
22
36
|
|
23
|
-
|
24
|
-
c.facebook.id_field = 'id'
|
37
|
+
mapping of other returned fields to arbitrary field names. By default, no fields parameter passed when querying a provider. Feel free to add any field supported by chosen provider
|
25
38
|
|
26
|
-
|
27
|
-
|
39
|
+
```
|
40
|
+
c.facebook.fields_mapping = { first_name: :name }
|
28
41
|
|
29
|
-
|
30
|
-
|
31
|
-
|
42
|
+
c.vk.name = 'vkontakte'
|
43
|
+
c.vk.id_field = 'uid'
|
44
|
+
c.vk.fields_mapping = { sex: :gender, photo_id: :avatar }
|
32
45
|
|
33
|
-
|
34
|
-
|
35
|
-
|
46
|
+
c.google.name = 'google'
|
47
|
+
c.google.id_field = 'email'
|
48
|
+
c.google.fields_mapping = { given_name: :first_name, picture: :avatar }
|
36
49
|
|
37
|
-
end
|
38
50
|
```
|
39
51
|
|
40
52
|
## Usage
|
@@ -44,4 +56,3 @@ end
|
|
44
56
|
`verify(:google, 'qweqweqwLKJNlknlknlk343=')`
|
45
57
|
|
46
58
|
The response will either return a struct, containing profile info fields, or raise an exception with error explanation
|
47
|
-
|
data/lib/oauth_token_verifier.rb
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.email = ['zxcgpppmnn@gmail.com']
|
12
12
|
|
13
13
|
spec.summary = 'Oauth2 token verification'
|
14
|
-
spec.description = 'This library provides possibility of verifying oauth2 access tokens
|
14
|
+
spec.description = 'This library provides possibility of verifying oauth2 access tokens obtained from third party'
|
15
15
|
spec.homepage = "https://github.com/Shkrt/oauth_token_verifier"
|
16
16
|
spec.license = 'MIT'
|
17
17
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oauth_token_verifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shkrt
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,8 +52,8 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
|
-
description: This library provides possibility of verifying oauth2 access tokens
|
56
|
-
|
55
|
+
description: This library provides possibility of verifying oauth2 access tokens obtained
|
56
|
+
from third party
|
57
57
|
email:
|
58
58
|
- zxcgpppmnn@gmail.com
|
59
59
|
executables: []
|
@@ -63,6 +63,7 @@ files:
|
|
63
63
|
- ".gitignore"
|
64
64
|
- ".rspec"
|
65
65
|
- ".travis.yml"
|
66
|
+
- CHANGELOG.md
|
66
67
|
- Gemfile
|
67
68
|
- LICENSE.txt
|
68
69
|
- README.md
|