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 +4 -4
- data/lib/omniauth/orcid/version.rb +1 -1
- data/lib/omniauth/strategies/orcid.rb +12 -6
- 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: 376112ae004c49e54e84390daeea37b92223cd6c
|
4
|
+
data.tar.gz: 68ec2c3fadfda9b1706c751bb75cd3b2092150cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d89f7b21a36a9570e237433357464de73b82de59a509f2fb27f74b9fbd1656bb1ef0eef5ff3c1d35c4a6c82d8b29bc8605870a0acc24c1f73a66ed175606bbb
|
7
|
+
data.tar.gz: 53ff86abe5974d7dfcb6566c4c01e2120ba99bfc8f856ef976be7a0f403e1b975d126d6dc536542a031e0e2e72d8f5e4e0c37d46298800dff2e8c7908b0b3f34
|
@@ -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.
|
24
|
-
|
25
|
-
|
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"] }
|