omniauth-wsfed 0.3.1.pre.beta → 0.3.2.pre.beta
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-wsfed/version.rb +1 -1
- data/lib/omniauth/strategies/wsfed.rb +3 -1
- data/spec/omniauth/strategies/wsfed_spec.rb +22 -0
- 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: 41837183b3cca16a41fb354df3df39a013c4c39c
|
|
4
|
+
data.tar.gz: f87ec79b820194dc55d78fc0d81ab2fa1d98fdb1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 682244ae78b8f3cb4c5af6a3b1e1999ff09a723bb337d314ea21d3710a7e70f39055205a292857f7e3fefaa5ec7d904ad3dcc9b2c7681022391ae41df921ca93
|
|
7
|
+
data.tar.gz: ce50e1823d95a415b848b268f7572d47b144275beae3d1e2b49fa3909e6f7bac5fdf5c12c5af745b20ff6c06d7a9ab220b7929b9c266c2dd9300fe693d53cf06
|
data/README.md
CHANGED
|
@@ -89,7 +89,7 @@ relationship. This option or `:idp_cert` must be present.
|
|
|
89
89
|
IdP must issue a secure token. **Required**
|
|
90
90
|
|
|
91
91
|
* `:reply` - The reply-to URL in your application for which a WSFed response should be
|
|
92
|
-
posted. **
|
|
92
|
+
posted. Defaults to the OmniAuth callback URL. **Optional**
|
|
93
93
|
|
|
94
94
|
* `:id_claim` - Name of the authentication claim that you want to use as OmniAuth's
|
|
95
95
|
**uid** property.
|
|
@@ -19,7 +19,9 @@ module OmniAuth
|
|
|
19
19
|
|
|
20
20
|
# Issues passive WS-Federation redirect for authentication...
|
|
21
21
|
def request_phase
|
|
22
|
-
|
|
22
|
+
settings = options.dup
|
|
23
|
+
settings[:reply] ||= callback_url
|
|
24
|
+
auth_request = OmniAuth::Strategies::WSFed::AuthRequest.new(settings, :whr => @request.params['whr'])
|
|
23
25
|
redirect(auth_request.redirect_url)
|
|
24
26
|
end
|
|
25
27
|
|
|
@@ -105,4 +105,26 @@ describe OmniAuth::Strategies::WSFed, :type => :strategy do
|
|
|
105
105
|
end
|
|
106
106
|
end
|
|
107
107
|
|
|
108
|
+
describe OmniAuth::Strategies::WSFed, :type => :strategy do
|
|
109
|
+
include OmniAuth::Test::StrategyTestCase
|
|
108
110
|
|
|
111
|
+
let(:home_realm_discovery) { '/auth/wsfed/home_realm_discovery' }
|
|
112
|
+
let(:wsfed_settings) do
|
|
113
|
+
{
|
|
114
|
+
:issuer => 'https://c4sc.accesscontrol.windows.net.com/v2/wsfederation',
|
|
115
|
+
:realm => 'http://example.com/rp',
|
|
116
|
+
}
|
|
117
|
+
end
|
|
118
|
+
let(:strategy) { [OmniAuth::Strategies::WSFed, wsfed_settings] }
|
|
119
|
+
let(:home_realm) { 'http://identity.c4sc.com' }
|
|
120
|
+
|
|
121
|
+
describe 'request_phase: GET /auth/wsfed' do
|
|
122
|
+
context 'without :reply setting' do
|
|
123
|
+
it 'should use the default callback_url' do
|
|
124
|
+
get 'auth/wsfed'
|
|
125
|
+
last_response.status.should == 302
|
|
126
|
+
last_response.location.should include("wreply=http%3A%2F%2Fexample.org%2Fauth%2Fwsfed%2Fcallback")
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-wsfed
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2.pre.beta
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Keith Beckman
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-01-
|
|
11
|
+
date: 2015-01-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: omniauth
|