omniauth-parallelmarkets 0.2.0 → 0.3.0

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
  SHA256:
3
- metadata.gz: e4f6fcf2ea0b6a34e008507971044f27933d1b973e15384639551b10cc7087f6
4
- data.tar.gz: ffbd698e80c6bae14b05d7f277b05b9fd4099f16ed229edb45baf20254198b4d
3
+ metadata.gz: a546b67917507c45b98686e72e5438d9d353d32714d55f47cf98df2d68e3ad26
4
+ data.tar.gz: 5f7c9ac005253ae226d006760d6405332222ed3da874f342806beccbc12423ff
5
5
  SHA512:
6
- metadata.gz: d7f75a678d03e70fdee7fc068ef92f799fd78d54f3f2df14185b8ef2064d3debe12d35f93bbc03702926aea04fd741acd23f76b0d60c4b5f4a004c507ca0aa6b
7
- data.tar.gz: 635a1ed6c37c5476d2f2dbc5a5aa77990056aff7238c463c485dd812959637cadcdc7a94dc4bad651dcc51b57a790aabf8018d6e1d1f3d71918a7130aa98091e
6
+ metadata.gz: a4a1cbc37e8e3b9f9cc4b5b5c051224d545c8b809ceb87ae4668638fb8ae0792695cbeab5465e15fe284bb5ffdb66d6c5f31f2661f1e9f6e0b3b487182f07bd5
7
+ data.tar.gz: 90a28c0e4615bebe6908c0764b7a57e6b2a0fee3d8bfbf07559928b895939c9cd65acf1f93ba90bad5c830c69911fbf6bb62031687a1cc658fd816fd0d1ddd95
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module ParallelMarkets
5
- VERSION = '0.2.0'
5
+ VERSION = '0.3.0'
6
6
  end
7
7
  end
@@ -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
- %w[scope client_options].each do |v|
37
- params[v.to_sym] = request.params[v] if request.params[v]
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
- @accreditations ||= access_token.get('/v1/accreditations').parsed
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.2.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-17 00:00:00.000000000 Z
11
+ date: 2019-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2