Skip to content

Commit

Permalink
feat: Add issuer information to the metadata endpoint, to allow IdPs …
Browse files Browse the repository at this point in the history
…to properly configure themselves.
  • Loading branch information
suprnova32 committed Sep 16, 2016
1 parent f6f9b97 commit 9f56c23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/omniauth/strategies/saml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def other_phase
settings = OneLogin::RubySaml::Settings.new(options)
if options.request_attributes.length > 0
settings.attribute_consuming_service.service_name options.attribute_service_name
settings.issuer = options.issuer
options.request_attributes.each do |attribute|
settings.attribute_consuming_service.add_attribute attribute
end
Expand Down
3 changes: 3 additions & 0 deletions spec/omniauth/strategies/saml_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def post_xml(xml=:example_response)

describe 'GET /auth/saml/metadata' do
before do
saml_options[:issuer] = 'http://example.com/SAML'
get '/auth/saml/metadata'
end

Expand All @@ -220,6 +221,8 @@ def post_xml(xml=:example_response)
last_response.body.should match /first_name/
last_response.body.should match /last_name/
last_response.body.should match /Required attributes/
last_response.body.should match /entityID/
last_response.body.should match /http:\/\/example.com\/SAML/
end
end

Expand Down

0 comments on commit 9f56c23

Please sign in to comment.