File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed
Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ def valid?
105105 return false
106106 end
107107
108- if !acceptable_acs_hosts . include? ( acs_host )
108+ if !acceptable_reponse_hosts . include? ( response_host )
109109 log "No acceptable AssertionConsumerServiceURL, either configure them via config.assertion_consumer_service_hosts or match to your metadata_url host"
110110 return false
111111 end
@@ -141,19 +141,19 @@ def session_index
141141 @_session_index ||= xpath ( "//samlp:SessionIndex" , samlp : samlp ) . first . try ( :content )
142142 end
143143
144- def acceptable_acs_hosts
145- ( config . assertion_consumer_service_hosts || [ ] ) +
146- service_provider . metdata_url_host ? [ service_provider . metdata_url_host ] : [ ]
144+ def acceptable_reponse_hosts
145+ Array ( config . assertion_consumer_service_hosts ) +
146+ ( service_provider . metadata_url_host ? [ service_provider . metadata_url_host ] : [ ] )
147147 end
148- private :acceptable_acs_hosts
148+ private :acceptable_reponse_hosts
149149
150- def acs_host
151- uri = URI ( acs_url )
150+ def response_host
151+ uri = URI ( response_url )
152152 if uri
153153 uri . host
154154 end
155155 end
156- private :acs_host
156+ private :response_host
157157
158158 def document
159159 @_document ||= Saml ::XML ::Document . parse ( raw_xml )
Original file line number Diff line number Diff line change 44 scenario 'Login via default signup page' do
55 saml_request = make_saml_request ( "http://foo.example.com/saml/consume" )
66 visit "/saml/auth?SAMLRequest=#{ CGI . escape ( saml_request ) } "
7- fill_in 'Email' , :with => "foo@example.com"
8- fill_in 'Password' , :with => "okidoki"
7+ expect ( status_code ) . to eq ( 200 )
8+ fill_in 'email' , :with => "foo@example.com"
9+ fill_in 'password' , :with => "okidoki"
910 click_button 'Sign in'
1011 click_button 'Submit' # simulating onload
1112 expect ( current_url ) . to eq ( 'http://foo.example.com/saml/consume' )
Original file line number Diff line number Diff line change 2929
3030 config . before do
3131 SamlIdp . configure do |c |
32+ c . assertion_consumer_service_hosts = [ "foo.example.com" ]
3233 c . attributes = {
3334 emailAddress : {
3435 name : "email-address" ,
4546 end
4647end
4748
49+ SamlIdp ::Default ::SERVICE_PROVIDER [ :metadata_url ] = 'https://example.com/meta'
4850SamlIdp ::Default ::SERVICE_PROVIDER [ :assertion_consumer_logout_service_url ] = 'https://foo.example.com/saml/logout'
4951Capybara . default_host = "https://app.example.com"
You can’t perform that action at this time.
0 commit comments