omniauth-orcid 1.2.2 → 1.2.3

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: 89a7bba826b507b5fd68ed5062727df72aeee266
4
- data.tar.gz: bff85eb2afdb39874dc9e2490b9c92b61d7c6194
3
+ metadata.gz: 353af87f1d370baacd6d609e4eca0b5fa388bcdf
4
+ data.tar.gz: fd04e0e1500d68c43e7c8163f0398b94d076ec48
5
5
  SHA512:
6
- metadata.gz: 267e7355f5af7477bc86a23e2a8dbb200f3e687abc586598eb5fd69ec02690d041e99d5f3dd15c928b9c29c3152e683699d483cb215353b09b7a1e0389aaf597
7
- data.tar.gz: 24153c67918ada3b3aec994db21a24037d4eb5772e76ca0026ad84acf81a8ec975dadc77e044e8bc5f156c7d884d84f68e33f3a1f6d48d85744fb95557cc83d6
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 /orcid-bio/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
 
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Orcid
3
- VERSION = "1.2.2"
3
+ VERSION = "1.2.3"
4
4
  end
5
5
  end
@@ -82,16 +82,20 @@ module OmniAuth
82
82
  end
83
83
  end
84
84
 
85
- def authorize_url
85
+ def root_url
86
86
  if options[:sandbox]
87
- 'https://sandbox.orcid.org/oauth/authorize'
87
+ 'https://sandbox.orcid.org'
88
88
  else
89
- 'https://orcid.org/oauth/authorize'
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
- site + '/oauth/token'
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://pub.orcid.org/oauth/token")
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://pub.sandbox.orcid.org/oauth/token")
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://api.orcid.org/oauth/token")
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://api.sandbox.orcid.org/oauth/token")
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.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: 2016-11-06 00:00:00.000000000 Z
12
+ date: 2017-06-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth-oauth2