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 +4 -4
- data/lib/omniauth/riskalyze/version.rb +1 -1
- data/lib/omniauth/strategies/riskalyze.rb +16 -12
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1ace6f5b3baac882ac990e9401382b87b768755
|
4
|
+
data.tar.gz: 6c5b7938f1c1ee894691db9c474142266708bfa9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63a283f9b233776473859fdc3ff7678b2459aefd843410156623777855e8fd8f93c0aa4424e4d564e5d464dfeaeab9752ad54a22ecdb361720a4120db83e0015
|
7
|
+
data.tar.gz: bec15c7ce57de87ef8d1eaf9b59b52e7768b701d06c2c13083051095dfff324259f436009f479cd1861b7846fa40619dc2acbd75e181d467f2d4ab24bdeea1ec
|
@@ -5,25 +5,27 @@ module OmniAuth
|
|
5
5
|
class Riskalyze < OmniAuth::Strategies::OAuth2
|
6
6
|
DEFAULT_SCOPE = 'profile'
|
7
7
|
|
8
|
-
option :client_options,
|
9
|
-
|
10
|
-
|
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
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
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
|
-
|
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
|
-
|
37
|
-
|
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
|