omniauth-samaritan 0.1.0 → 0.1.1
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
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
NGUzOTdiY2EwODdjNTdhYjRlNGQyOWZhNGM2NmFjYTY1NTE4MjNhMg==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
NGY0NmZkNWY0NjYzYmRiNDNmNGNhY2M1YWI4OGM3MmExNWI3ZmJkMw==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
ZWY2NzJiYTJmOWIwZDI2YTZiMjllNjUwM2QxMzBkNzY2YjRlMTExMjQ4NTdm
|
|
10
|
+
ZjFmNTMyM2FmZDFmNWM5NjQ3YWNmZjBiZjBiZDBiODEwZWMzZTg0ODc5MGFk
|
|
11
|
+
YWY1MmM1MTgyNGIxZWYxOGQyYzU1NjgwNjRkYTFmNzcwZjM3YmU=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
N2VlZTQ3OWFiYTBkYjIwN2ZlM2RhODMzMzFjNjg4MWFmZmJhMmY1YWNkMzFk
|
|
14
|
+
NTkyMzk3YzBhZWQwMjNjZTYxYTg3MzFmY2U2YTQzMmYwMzNlZGU3ZDlkY2Ni
|
|
15
|
+
YWMxMTdhOWNiNWU4M2E5OTI3NzBjOTYwODViZGQ3MjNkNTRlZDE=
|
|
@@ -10,16 +10,14 @@ module OmniAuth
|
|
|
10
10
|
option :client_options, {}
|
|
11
11
|
|
|
12
12
|
option :sandbox_client_options, {
|
|
13
|
-
:
|
|
14
|
-
:
|
|
15
|
-
:
|
|
16
|
-
:identity_url => '/smi/api/identity/mine'}
|
|
13
|
+
:authorize_url => 'https://sandbox.smchcn.net/asrv/smi/oauth/authorize',
|
|
14
|
+
:token_url => 'https://sandbox.smchcn.net/asrv/smi/oauth/token',
|
|
15
|
+
:identity_url => 'https://sandbox.smchcn.net/smi/api/identity/mine'}
|
|
17
16
|
|
|
18
17
|
option :production_client_options, {
|
|
19
|
-
:
|
|
20
|
-
:
|
|
21
|
-
:
|
|
22
|
-
:identity_url => '/smi/api/identity/mine'}
|
|
18
|
+
:authorize_url => 'https://accounts.samaritanministries.org/auth',
|
|
19
|
+
:token_url => 'https://accounts.samaritanministries.org/auth/smi/oauth/token',
|
|
20
|
+
:identity_url => 'https://platformapi.samaritanministries.org/smi/api/identity/mine'}
|
|
23
21
|
|
|
24
22
|
def client_options
|
|
25
23
|
client_options = options.client_options
|
|
@@ -26,24 +26,14 @@ describe OmniAuth::Strategies::Samaritan do
|
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
describe '#client_options' do
|
|
29
|
-
it 'has correct site for sandbox' do
|
|
30
|
-
@options = {:environment => :sandbox}
|
|
31
|
-
subject.client.site.should eq('https://sandbox.smchcn.net/')
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
it 'has correct site for production' do
|
|
35
|
-
@options = {:environment => :production}
|
|
36
|
-
subject.client.site.should eq('https://api.smchcn.net/')
|
|
37
|
-
end
|
|
38
|
-
|
|
39
29
|
it 'has correct authorize_url' do
|
|
40
30
|
@options = {:environment => :production}
|
|
41
|
-
subject.client.options[:authorize_url].should eq('/
|
|
31
|
+
subject.client.options[:authorize_url].should eq('https://accounts.samaritanministries.org/auth')
|
|
42
32
|
end
|
|
43
33
|
|
|
44
34
|
it 'has correct token_url' do
|
|
45
35
|
@options = {:environment => :production}
|
|
46
|
-
subject.client.options[:token_url].should eq('/
|
|
36
|
+
subject.client.options[:token_url].should eq('https://accounts.samaritanministries.org/auth/smi/oauth/token')
|
|
47
37
|
end
|
|
48
38
|
|
|
49
39
|
describe "overrides" do
|
|
@@ -92,7 +82,7 @@ describe OmniAuth::Strategies::Samaritan do
|
|
|
92
82
|
OAuth2::Client.new('abc', 'def') do |builder|
|
|
93
83
|
builder.request :url_encoded
|
|
94
84
|
builder.adapter :test do |stub|
|
|
95
|
-
stub.get('/
|
|
85
|
+
stub.get('/smi/api/identity/mine') {|env| [200, {'content-type' => 'application/json'}, '{"id": "12345"}']}
|
|
96
86
|
end
|
|
97
87
|
end
|
|
98
88
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-samaritan
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Doug Bradbury
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-
|
|
12
|
+
date: 2014-07-21 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: omniauth
|