omniauth-parallelmarkets 0.2.0 → 0.3.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a546b67917507c45b98686e72e5438d9d353d32714d55f47cf98df2d68e3ad26
|
4
|
+
data.tar.gz: 5f7c9ac005253ae226d006760d6405332222ed3da874f342806beccbc12423ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4a1cbc37e8e3b9f9cc4b5b5c051224d545c8b809ceb87ae4668638fb8ae0792695cbeab5465e15fe284bb5ffdb66d6c5f31f2661f1e9f6e0b3b487182f07bd5
|
7
|
+
data.tar.gz: 90a28c0e4615bebe6908c0764b7a57e6b2a0fee3d8bfbf07559928b895939c9cd65acf1f93ba90bad5c830c69911fbf6bb62031687a1cc658fd816fd0d1ddd95
|
@@ -9,6 +9,7 @@ module OmniAuth
|
|
9
9
|
site: 'https://api.parallelmarkets.com',
|
10
10
|
authorize_url: '/v1/oauth/authorize',
|
11
11
|
token_url: '/v1/oauth/token'
|
12
|
+
option :authorize_options, %i[scope force_accreditation_check]
|
12
13
|
|
13
14
|
uid { raw_info['id'] }
|
14
15
|
|
@@ -33,12 +34,17 @@ module OmniAuth
|
|
33
34
|
|
34
35
|
def authorize_params
|
35
36
|
super.tap do |params|
|
36
|
-
|
37
|
-
params[
|
37
|
+
options[:authorize_options].each do |k|
|
38
|
+
params[k] = request.params[k.to_s] if request.params[k.to_s]
|
38
39
|
end
|
39
40
|
end
|
40
41
|
end
|
41
42
|
|
43
|
+
# this is dumb, but https://github.com/omniauth/omniauth-oauth2/issues/93 is still open
|
44
|
+
def callback_url
|
45
|
+
options[:redirect_uri] || (full_host + script_name + callback_path)
|
46
|
+
end
|
47
|
+
|
42
48
|
def raw_info
|
43
49
|
@raw_info ||= access_token.get('/v1/me').parsed
|
44
50
|
end
|
@@ -48,7 +54,7 @@ module OmniAuth
|
|
48
54
|
end
|
49
55
|
|
50
56
|
def raw_accreditations
|
51
|
-
@
|
57
|
+
@raw_accreditations ||= access_token.get('/v1/accreditations').parsed
|
52
58
|
end
|
53
59
|
|
54
60
|
def accreditations
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-parallelmarkets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Muller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|