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 17, 2016
1 parent 1432605 commit 7bbbb67
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)
expect(last_response.body).to match /first_name/
expect(last_response.body).to match /last_name/
expect(last_response.body).to match /Required attributes/
expect(last_response.body).to match /entityID/
expect(last_response.body).to match /http:\/\/example.com\/SAML/
end
end

Expand Down

0 comments on commit 7bbbb67

Please sign in to comment.