omniauth-orcid 1.0.30 → 1.0.31
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 +10 -1
- 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: c476ec066f36b268635183f18a9f83001770ee80
|
4
|
+
data.tar.gz: 2bdc39d25a23d09c22eef979e75439554581f5d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 293c1fe030cdf8e9d2f12458c7acda47544dd49d4cdee9efba5915a655b9ea79f0227a5a6a2ce1a2089a9ae5ae4065733735b75fa16c3eab31853103f8322761
|
7
|
+
data.tar.gz: baeb5ac31997f4a5a82f6407527d2536aaab47636c00e70f154ae29e79281afc9496e08e7cb783a6a8532a12629d8a38baaef5600b901231b875f80eda6e0081
|
@@ -63,6 +63,15 @@ module OmniAuth
|
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
|
+
def api_base_url
|
67
|
+
case namespace
|
68
|
+
when 'sandbox' then "https://api.sandbox.orcid.org/v#{API_VERSION}"
|
69
|
+
when 'production' then "https://api.orcid.org/v#{API_VERSION}"
|
70
|
+
when 'public_sandbox' then "https://pub.sandbox.orcid.org/v#{API_VERSION}"
|
71
|
+
when 'public' then "https://pub.orcid.org/v#{API_VERSION}"
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
66
75
|
def authorize_url
|
67
76
|
if options[:sandbox]
|
68
77
|
'https://sandbox.orcid.org/oauth/authorize'
|
@@ -105,7 +114,7 @@ module OmniAuth
|
|
105
114
|
end
|
106
115
|
|
107
116
|
def request_info
|
108
|
-
client.request(:get, "
|
117
|
+
client.request(:get, "#{api_base_url}/#{uid}/orcid-bio", headers: { accept: 'application/json' }).parsed || {}
|
109
118
|
end
|
110
119
|
|
111
120
|
def raw_info
|
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.
|
4
|
+
version: 1.0.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gudmundur A. Thorisson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-12-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omniauth-oauth2
|