omniauth-riskalyze 0.0.1 → 0.0.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: 53bb51618d01e8b1ea53733a228fe97413ca32e0
4
- data.tar.gz: c81d1eea1af6e9473bbd9d56ec36d5b3dd75d6f6
3
+ metadata.gz: c1ace6f5b3baac882ac990e9401382b87b768755
4
+ data.tar.gz: 6c5b7938f1c1ee894691db9c474142266708bfa9
5
5
  SHA512:
6
- metadata.gz: c5aef3a793b265b27a32fa7bf43a63d9087060cf444691b2448fd96f5d4d355a9f36b500523a7b46bf76446d5127195b37bdb9fbfa660aff91290b7aee358d1e
7
- data.tar.gz: 1db59e81229a61dc70b5ecd7dd54ff31f81f9fb7c1b6f32bea58245bb9aaae48cac603b64e94212b22970e13bfb086c0725b23f96d069435c237290432f26604
6
+ metadata.gz: 63a283f9b233776473859fdc3ff7678b2459aefd843410156623777855e8fd8f93c0aa4424e4d564e5d464dfeaeab9752ad54a22ecdb361720a4120db83e0015
7
+ data.tar.gz: bec15c7ce57de87ef8d1eaf9b59b52e7768b701d06c2c13083051095dfff324259f436009f479cd1861b7846fa40619dc2acbd75e181d467f2d4ab24bdeea1ec
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Riskalyze
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
  end
5
5
  end
@@ -5,25 +5,27 @@ module OmniAuth
5
5
  class Riskalyze < OmniAuth::Strategies::OAuth2
6
6
  DEFAULT_SCOPE = 'profile'
7
7
 
8
- option :client_options, :site => 'https://api.riskalyze.com',
9
- :authorize_url => 'https://pro.riskalyze.com/oauthconnect',
10
- :token_url => 'https://api2.riskalyze.com/ap/v1/oauthpro/token'
8
+ option :client_options, {
9
+ site: 'https://api.riskalyze.com',
10
+ authorize_url: 'https://pro.riskalyze.com/oauthconnect',
11
+ token_url: 'https://api2.riskalyze.com/ap/v1/oauthpro/token'
12
+ }
11
13
 
12
14
  uid { raw_info['uuid'] }
13
15
 
14
16
  info do
15
17
  {
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']
18
+ first_name: raw_info['first_name'],
19
+ last_name: raw_info['last_name'],
20
+ email: raw_info['email'],
21
+ picture: raw_info['picture'],
22
+ promo_code: raw_info['promo_code']
21
23
  }
22
24
  end
23
25
 
24
26
  extra do
25
27
  {
26
- :raw_info => raw_info
28
+ raw_info: raw_info
27
29
  }
28
30
  end
29
31
 
@@ -33,11 +35,13 @@ module OmniAuth
33
35
 
34
36
  def request_phase
35
37
  options[:authorize_params] = {
36
- :client_id => options['client_id'],
37
- :response_type => 'code',
38
- :scopes => (options['scope'] || DEFAULT_SCOPE)
38
+ client_id: options['client_id'],
39
+ response_type: 'code',
39
40
  }
40
41
 
42
+ options[:authorize_params][:scope] = options['scope'] unless options['scope'].to_s.nil?
43
+ options[:authorize_params][:redirect_uri] = options['redirect_uri'] unless options['redirect_uri'].to_s.nil?
44
+
41
45
  super
42
46
  end
43
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-riskalyze
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Pheasey