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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec509c6ef623d7c5f4c3e99bcc9998f6add0f3d9
4
- data.tar.gz: e3df41224d4579a2561340036465f8ffc3679a81
3
+ metadata.gz: d1245710353bc053bde80275e5b06bf168d2e604
4
+ data.tar.gz: f7e6a474b61e9c6d2a33de3e26de1ad7fc680012
5
5
  SHA512:
6
- metadata.gz: 19b23a9dd996aa58c8f138af2475248902e3695470a3b3bbf13530386cdf7dd23e8870a5e558a8af2831c1043c8e5c0335671221323c6afe8debbeaeb4d5159d
7
- data.tar.gz: 5be231ec627f88e026a9c59edcb399eff45f2b66908df1d4e247230ae82d9047285241ec96c2446afc5709736ff313ee5463c47eb8bdbb338fdf73244c333f1b
6
+ metadata.gz: 9f395232a0f62eebb7ed13472861eb3fd8540e0ee503430a8bb6da09534743fc9cf2a530a4adc637a2aacde619c47d29ba4908934cda7a0b5643cea10399072e
7
+ data.tar.gz: 586209254abcb29dc9824f92a927abf5c8a9db7ceb3dfec824025457332942dfb5662025f6a9de4fd4cd425ef4193a55e05d064b36e3c1f972dff5651ad5fe5e
data/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ Changelog
2
+ ============
3
+
4
+ #### 0.1.2
5
+ - Explicitly require net/http
6
+
7
+
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
- # You should configure enabled providers first, only three providers are supported by now
17
- c.enabled_providers = [:google, :facebook, :vk]
27
+ ```
28
+ # provider name to be returned
29
+ c.facebook.name = 'facebook'
30
+ ```
18
31
 
19
- # then goes separate configuration for each provider
20
- # provider name to be returned
21
- c.facebook.name = 'facebook'
32
+ ```
33
+ # id field - this used to uniquely identify user
34
+ c.facebook.id_field = 'id'
35
+ ```
22
36
 
23
- # id field - this used to uniquely identify user
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
- # mapping of other returned fields. By default, no fields parameter passed when querying a provider. Feel free to add any field supported by chosen provider
27
- c.facebook.fields_mapping = { first_name: :name }
39
+ ```
40
+ c.facebook.fields_mapping = { first_name: :name }
28
41
 
29
- c.vk.name = 'vkontakte'
30
- c.vk.id_field = 'uid'
31
- c.vk.fields_mapping = { sex: :gender, photo_id: :avatar }
42
+ c.vk.name = 'vkontakte'
43
+ c.vk.id_field = 'uid'
44
+ c.vk.fields_mapping = { sex: :gender, photo_id: :avatar }
32
45
 
33
- c.google.name = 'google'
34
- c.google.id_field = 'email'
35
- c.google.fields_mapping = { given_name: :first_name, picture: :avatar }
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
-
@@ -1,3 +1,3 @@
1
1
  module OauthTokenVerifier
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.1.2'.freeze
3
3
  end
@@ -1,3 +1,4 @@
1
+ require 'net/http'
1
2
  require 'oauth_token_verifier/version'
2
3
  require 'oauth_token_verifier/configuration'
3
4
  require 'oauth_token_verifier/providers/google'
@@ -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, obtained from third party'
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.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-03 00:00:00.000000000 Z
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
- obtained from third party
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