omniauth-orcid 1.2.2 → 1.2.3
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 +4 -4
- data/README.md +1 -1
- data/lib/omniauth/orcid/version.rb +1 -1
- data/lib/omniauth/strategies/orcid.rb +8 -4
- data/spec/omniauth/strategies/orcid_spec.rb +4 -4
- 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: 353af87f1d370baacd6d609e4eca0b5fa388bcdf
|
|
4
|
+
data.tar.gz: fd04e0e1500d68c43e7c8163f0398b94d076ec48
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fb3962e9eb0ef421998b825eaedd9729114cd9577559bf046c7b4da1128a1b706930e50259a126765b53776f2108fb8a17d01c05d6346e673c364b1fe9b24917
|
|
7
|
+
data.tar.gz: ab041314860086b011f2184bbca5261e4443e3aeaccff6fdcb0075e30f2c1978369adb13139992aed2742c20208eb35d50333e4919afdcf7ecf49d7025df901c
|
data/README.md
CHANGED
|
@@ -62,7 +62,7 @@ end
|
|
|
62
62
|
`omniauth-orcid` sets the appropriate default scope depending on the `member` falg:
|
|
63
63
|
|
|
64
64
|
* non-member: `/authenticate`
|
|
65
|
-
* member: `/read-limited /activities/update /
|
|
65
|
+
* member: `/read-limited /activities/update /person/update`
|
|
66
66
|
|
|
67
67
|
You can override the scope via the `scope` query param.
|
|
68
68
|
|
|
@@ -82,16 +82,20 @@ module OmniAuth
|
|
|
82
82
|
end
|
|
83
83
|
end
|
|
84
84
|
|
|
85
|
-
def
|
|
85
|
+
def root_url
|
|
86
86
|
if options[:sandbox]
|
|
87
|
-
'https://sandbox.orcid.org
|
|
87
|
+
'https://sandbox.orcid.org'
|
|
88
88
|
else
|
|
89
|
-
'https://orcid.org
|
|
89
|
+
'https://orcid.org'
|
|
90
90
|
end
|
|
91
91
|
end
|
|
92
92
|
|
|
93
|
+
def authorize_url
|
|
94
|
+
root_url + '/oauth/authorize'
|
|
95
|
+
end
|
|
96
|
+
|
|
93
97
|
def token_url
|
|
94
|
-
|
|
98
|
+
root_url + '/oauth/token'
|
|
95
99
|
end
|
|
96
100
|
|
|
97
101
|
def scope
|
|
@@ -39,7 +39,7 @@ describe OmniAuth::Strategies::ORCID do
|
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
it 'should have correct token url' do
|
|
42
|
-
expect(subject.options.client_options.token_url).to eq("https://
|
|
42
|
+
expect(subject.options.client_options.token_url).to eq("https://orcid.org/oauth/token")
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
it 'should have correct authorize url' do
|
|
@@ -65,7 +65,7 @@ describe OmniAuth::Strategies::ORCID do
|
|
|
65
65
|
end
|
|
66
66
|
|
|
67
67
|
it 'should have correct token url' do
|
|
68
|
-
expect(subject.options.client_options.token_url).to eq("https://
|
|
68
|
+
expect(subject.options.client_options.token_url).to eq("https://sandbox.orcid.org/oauth/token")
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
it 'should have correct authorize url' do
|
|
@@ -91,7 +91,7 @@ describe OmniAuth::Strategies::ORCID do
|
|
|
91
91
|
end
|
|
92
92
|
|
|
93
93
|
it 'should have correct token url' do
|
|
94
|
-
expect(subject.options.client_options.token_url).to eq("https://
|
|
94
|
+
expect(subject.options.client_options.token_url).to eq("https://orcid.org/oauth/token")
|
|
95
95
|
end
|
|
96
96
|
end
|
|
97
97
|
|
|
@@ -109,7 +109,7 @@ describe OmniAuth::Strategies::ORCID do
|
|
|
109
109
|
end
|
|
110
110
|
|
|
111
111
|
it 'should have correct token url' do
|
|
112
|
-
expect(subject.options.client_options.token_url).to eq("https://
|
|
112
|
+
expect(subject.options.client_options.token_url).to eq("https://sandbox.orcid.org/oauth/token")
|
|
113
113
|
end
|
|
114
114
|
end
|
|
115
115
|
|
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.2.
|
|
4
|
+
version: 1.2.3
|
|
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:
|
|
12
|
+
date: 2017-06-05 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: omniauth-oauth2
|