omniauth-riskalyze 0.0.3 → 0.0.4
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 +5 -29
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3667c42aefc36bb0449d0d8f8271b56f631bdb78
|
4
|
+
data.tar.gz: cacad2aa498ebb85fc0424a8d2ee752df37c2955
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 014d306053c1b6fed3c6644f58d91eaed9141f73f0b22be78a04b35d0e45298677c069f04687d23b258606fe960e4cb69dc0984c0654539a45a20c3cf9b2cca4
|
7
|
+
data.tar.gz: ba6aab1a408365f51677313993bfb317d5c0898c1f0829529f437f50d9d925c50fb273d22b8ba2fed2232af41862ec2da16eaa74327a5675c53e7dae1daad180
|
@@ -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.
|
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-
|
11
|
+
date: 2016-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|