omniauth-riskalyze 0.0.3 → 0.0.4

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: 81c4175a0417bf5837602c776dd975e44c33aa08
4
- data.tar.gz: dbe20c48ed1b8c0c05fa65cb35bd7379afc4145a
3
+ metadata.gz: 3667c42aefc36bb0449d0d8f8271b56f631bdb78
4
+ data.tar.gz: cacad2aa498ebb85fc0424a8d2ee752df37c2955
5
5
  SHA512:
6
- metadata.gz: 7ac1d0fbd5d4695132d13e1d228167ae21bb97d81f444eb62c8908f2552d0d5d4d266a066187def02b997012ae3b48592134648dd4e81d68d7ae2a16904cf1e7
7
- data.tar.gz: b43b09a3c9746f6f59cfb1d45051ffe66c84a3878b13b5bbd4e741d53acc14479f54becefcde61e07f6a37e120acc4f342824069dc41ebf69549a286e5c99192
6
+ metadata.gz: 014d306053c1b6fed3c6644f58d91eaed9141f73f0b22be78a04b35d0e45298677c069f04687d23b258606fe960e4cb69dc0984c0654539a45a20c3cf9b2cca4
7
+ data.tar.gz: ba6aab1a408365f51677313993bfb317d5c0898c1f0829529f437f50d9d925c50fb273d22b8ba2fed2232af41862ec2da16eaa74327a5675c53e7dae1daad180
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Riskalyze
3
- VERSION = '0.0.3'
3
+ VERSION = '0.0.4'
4
4
  end
5
5
  end
@@ -3,40 +3,16 @@ require 'omniauth-oauth2'
3
3
  module OmniAuth
4
4
  module Strategies
5
5
  class Riskalyze < OmniAuth::Strategies::OAuth2
6
+ # Give your strategy a name.
7
+ option :name, 'riskalyze'
8
+
9
+ # This is where you pass the options you would pass when
10
+ # initializing your consumer from the OAuth gem.
6
11
  option :client_options, {
7
12
  site: 'https://api.riskalyze.com',
8
13
  authorize_url: 'https://pro.riskalyze.com/oauthconnect',
9
14
  token_url: 'https://api2.riskalyze.com/ap/v1/oauthpro/token'
10
15
  }
11
-
12
- uid { raw_info['uuid'] }
13
-
14
- info do
15
- {
16
- first_name: raw_info['first_name'],
17
- last_name: raw_info['last_name'],
18
- email: raw_info['email'],
19
- picture: raw_info['picture'],
20
- promo_code: raw_info['promo_code']
21
- }
22
- end
23
-
24
- extra do
25
- {
26
- raw_info: raw_info
27
- }
28
- end
29
-
30
- def raw_info
31
- @raw_info ||= access_token.get('/v1/me').parsed || {}
32
- end
33
-
34
- def request_phase
35
- options[:authorize_params] = { client_id: options['client_id'], response_type: 'code' }
36
- options[:authorize_params][:redirect_uri] = options['redirect_uri'] unless options['redirect_uri'].to_s.empty?
37
- options[:authorize_params][:scope] = options['scope'] unless options['scope'].to_s.empty?
38
- super
39
- end
40
16
  end
41
17
  end
42
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-riskalyze
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Pheasey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-04 00:00:00.000000000 Z
11
+ date: 2016-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth