omniauth-wsfed 0.3.1.pre.beta → 0.3.2.pre.beta

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: 6c0ad3503577aad70d428772c14a135661181aad
4
- data.tar.gz: 71abed720db88b079785cda06a4afdd344f5764c
3
+ metadata.gz: 41837183b3cca16a41fb354df3df39a013c4c39c
4
+ data.tar.gz: f87ec79b820194dc55d78fc0d81ab2fa1d98fdb1
5
5
  SHA512:
6
- metadata.gz: cd213f0cb47858742d2994ed1d5dc01cea7a3a21d199d735eae50202ad7b611c321ef5fbe51b969b3928fc3cf56bfc174d063c1f13b23ce9014b846a23ad4ce9
7
- data.tar.gz: b43aba00a37ec14879c4b8014c1ffe13fe68a3a29e31c7f54e0fe1d28971ccdfd1685aa7f7565770416668f6bb1ee7f6ce98f65ee47fc3b369ba5ed1f0ab1f5b
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. **Required**
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.
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module WSFed
3
- VERSION = '0.3.1-beta'
3
+ VERSION = '0.3.2-beta'
4
4
  end
5
5
  end
@@ -19,7 +19,9 @@ module OmniAuth
19
19
 
20
20
  # Issues passive WS-Federation redirect for authentication...
21
21
  def request_phase
22
- auth_request = OmniAuth::Strategies::WSFed::AuthRequest.new(options, :whr => @request.params['whr'])
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.1.pre.beta
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-19 00:00:00.000000000 Z
11
+ date: 2015-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth