omniauth-linkus 0.1.2 → 0.1.3

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: f4a02ff15229d21353bb9fe429ddc9e23b0427dd
4
- data.tar.gz: f99e114969af0662a0d994e64c9b017d062e3a63
3
+ metadata.gz: ecace412c0a391450bcabd51b847c6697714e0b9
4
+ data.tar.gz: e4302b1ab7700454d7c89ec44e904e1942dc943c
5
5
  SHA512:
6
- metadata.gz: eff64b47cb3927988000c8508feba795393147792beee33bb18e17c038f514accb57755e990d95c0621bfaa4d2f8e36dfe6237b9b754268c3e1da53e0c9c8fe0
7
- data.tar.gz: 5406c6ed668d103980ade9ed61bcf566f0955ae12c56d7d3450b0d169901206c18f883993970f2456889b967144979bf0967cd2f66c7c9dc44b1fabb90de1a17
6
+ metadata.gz: f3bba43093c13a979384c8d5a87dcc4e1d1ee56997bc2f6227c2175883f8b638bf4daa3dca2f70a57ab05e838ad2b84e566fb2765911a09c55afa112901204b7
7
+ data.tar.gz: 23b72d27efdb12d9f48a88d6f8c33b22461a2d4d8b7ea3810cb119ba1d0b96e1a1d19a238837107ecf4fb30b95e393835fbd8a7570ac59a73d137bf309429788
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Linkus
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.3'
4
4
  end
5
5
  end
@@ -3,6 +3,24 @@ require 'omniauth-oauth2'
3
3
  module OmniAuth
4
4
  module Strategies
5
5
  class Linkus < OmniAuth::Strategies::OAuth2
6
+ RAW_INFO_URL = 'api/v1/users/me'
7
+
8
+ uid { raw_info['uid'] }
9
+
10
+ info do
11
+ {
12
+ sid: raw_info['sid'],
13
+ name: raw_info['name']
14
+ }
15
+ end
16
+
17
+ extra do
18
+ { raw_info: raw_info }
19
+ end
20
+
21
+ def raw_info
22
+ @raw_info ||= JSON.parse(access_token.get(RAW_INFO_URL).response.body)
23
+ end
6
24
  end
7
25
  end
8
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-linkus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shoya TANAKA