omniauth-orcid 1.0.9 → 1.0.10

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: 9bfd6b414faa38f89e3a94c485a85aa2e5900c41
4
- data.tar.gz: da69f0939174589d56bf27b1c802dbb15781c271
3
+ metadata.gz: 376112ae004c49e54e84390daeea37b92223cd6c
4
+ data.tar.gz: 68ec2c3fadfda9b1706c751bb75cd3b2092150cd
5
5
  SHA512:
6
- metadata.gz: 98428a673b258650b838fe782835c268265fdbc406f613a469c8b2cacf5e02f6018fe156a5870b7a9e86e16d517c5a09775dc4b62df27e8c19d57ffd3effc81a
7
- data.tar.gz: d2e5f3a1448bfa17928d383d62a6cab822cd2707731538e975ff62050f6d15df9138d7c8ca113bb5b21cefab1ee60917f834e99431f7fdfaf3572f1c61b67e45
6
+ metadata.gz: 1d89f7b21a36a9570e237433357464de73b82de59a509f2fb27f74b9fbd1656bb1ef0eef5ff3c1d35c4a6c82d8b29bc8605870a0acc24c1f73a66ed175606bbb
7
+ data.tar.gz: 53ff86abe5974d7dfcb6566c4c01e2120ba99bfc8f856ef976be7a0f403e1b975d126d6dc536542a031e0e2e72d8f5e4e0c37d46298800dff2e8c7908b0b3f34
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Orcid
3
- VERSION = "1.0.9"
3
+ VERSION = "1.0.10"
4
4
  end
5
5
  end
@@ -11,18 +11,24 @@ module OmniAuth
11
11
 
12
12
  option :name, "orcid"
13
13
 
14
- option :authorize_options, [:redirect_uri]
14
+ option :authorize_options, [:scope, :redirect_uri, :show_login, :lang]
15
15
 
16
16
  option :client_options, {
17
17
  site: 'https://pub.orcid.org',
18
- authorize_url: 'https://orcid.org/oauth/authorize',
19
- scope: '/authenticate'
18
+ authorize_url: 'https://orcid.org/oauth/authorize'
20
19
  }
21
20
 
22
21
  def authorize_params
23
- super.merge(scope: request.params["scope"] || DEFAULT_SCOPE,
24
- show_login: request.params["show_login"] || 'true',
25
- lang: request.params["lang"])
22
+ super.tap do |params|
23
+ %w[scope redirect_uri show_login lang].each do |v|
24
+ if request.params[v]
25
+ params[v.to_sym] = request.params[v]
26
+ end
27
+ end
28
+
29
+ params[:scope] ||= DEFAULT_SCOPE
30
+ params[:show_login] ||= 'true'
31
+ end
26
32
  end
27
33
 
28
34
  uid { access_token.params["orcid"] }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-orcid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gudmundur A. Thorisson