omniauth-quanto 0.1.1 → 0.1.2

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: b622bfa65c2bf1b8ec66193daa72797d881559b1
4
- data.tar.gz: 2041751c4414163fe7ac901c390b44f78e9abdcb
3
+ metadata.gz: 9117c70c08edb1f0e7c8bbb26a636fa384b21262
4
+ data.tar.gz: 587ac57582c17b76a6f8b79c00049123a081301e
5
5
  SHA512:
6
- metadata.gz: 102543d3cab559c6f4297735eaf45521d8f384be9598b6dc6ab4d536afca2249cbbea71af7da6ca160e190e4ada1a89e1ce7fbf2cbea125e0eb03fa216b3153e
7
- data.tar.gz: e4d16b420c72a418c565053c2146c1cf3c0341a3a5205c9d88f460632a8d7555aced058ff7d6ca7994d076c00422acbdef046174f8f07820f6e726a3643a065f
6
+ metadata.gz: cace7a4ccd68e622dab5bb3dde1ba3423a361c2958ca8ca54deb1b7db36539fa153a142df02e4928ee7bf713a4f8ead895e433a36195f8a7d2ea5b211e38b43f
7
+ data.tar.gz: 801d37f8f033ebbe3be8e0483f86d34ef6c935d1af8132cc9d2f988bc41594f0868d188828fd56d885779f96e6fcc5e4d15a8f7bcee3e8d52f513d78cb2ed414
@@ -0,0 +1,2 @@
1
+ require 'omniauth-quanto/version'
2
+ require 'omniauth/strategies/quanto'
@@ -0,0 +1,5 @@
1
+ module OmniAuth
2
+ module Quanto
3
+ VERSION = "0.1.2"
4
+ end
5
+ end
@@ -0,0 +1,45 @@
1
+ require 'oauth2'
2
+ require 'omniauth'
3
+ require 'omniauth-oauth2'
4
+
5
+ module OmniAuth
6
+ module Strategies
7
+ class Quanto < OmniAuth::Strategies::OAuth2
8
+ # Give your strategy a name.
9
+ option :name, :quanto
10
+
11
+ # This is where you pass the options you would pass when
12
+ # initializing your consumer from the OAuth gem.
13
+ option :client_options, {
14
+ site: 'http://quanto.herokuapp.com',
15
+ request_token_path: '/oauth/request_token',
16
+ access_token_path: '/oauth/access_token',
17
+ authorize_path: '/oauth/authorize',
18
+ }
19
+
20
+ # These are called after authentication has succeeded. If
21
+ # possible, you should try to set the UID without making
22
+ # additional calls (if the user id is returned with the token
23
+ # or as a URI parameter). This may not be possible with all
24
+ # providers.
25
+ uid{ raw_info['id'] }
26
+
27
+ info do
28
+ {
29
+ name: raw_info['name'],
30
+ email: raw_info['email'],
31
+ }
32
+ end
33
+
34
+ extra do
35
+ {
36
+ 'raw_info' => raw_info
37
+ }
38
+ end
39
+
40
+ def raw_info
41
+ @raw_info ||= access_token.get('/api/v1/me').parsed
42
+ end
43
+ end
44
+ end
45
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-quanto
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
  - Rasmus Rygaard
@@ -35,6 +35,9 @@ files:
35
35
  - Gemfile
36
36
  - LICENSE
37
37
  - README.md
38
+ - lib/omniauth-quanto.rb
39
+ - lib/omniauth-quanto/version.rb
40
+ - lib/omniauth/strategies/quanto.rb
38
41
  - omniauth-quanto.gemspec
39
42
  homepage: http://github.com/rasmusrygaard/omniauth-quanto
40
43
  licenses: []