Skip to content

Commit

Permalink
Merge pull request #30 from 18F/remove_single_logout_service_from_met…
Browse files Browse the repository at this point in the history
…adata

Remove single logout service from metadata
  • Loading branch information
achapm authored Apr 21, 2020
2 parents ffc25a2 + 9bd2945 commit 8d0bedc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
4 changes: 0 additions & 4 deletions lib/saml_idp/metadata_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ def fresh
entity.IDPSSODescriptor protocolSupportEnumeration: protocol_enumeration do |descriptor|
build_key_descriptor descriptor
build_name_id_formats descriptor
descriptor.SingleLogoutService Binding: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST",
Location: single_logout_service_post_location
descriptor.SingleLogoutService Binding: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect",
Location: single_logout_service_post_location
descriptor.SingleSignOnService Binding: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST",
Location: single_service_post_location
descriptor.SingleSignOnService Binding: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect",
Expand Down
6 changes: 2 additions & 4 deletions spec/lib/saml_idp/metadata_builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
module SamlIdp
describe MetadataBuilder do
include CloudhsmMockable

it "has a valid fresh" do
expect(subject.fresh).not_to be_empty
end
Expand Down Expand Up @@ -33,9 +33,7 @@ module SamlIdp

it "includes logout element" do
subject.configurator.single_logout_service_post_location = 'https://example.com/saml/logout'
expect(subject.fresh).to match(
'<SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://example.com/saml/logout"/>'
)
expect(subject.fresh).not_to include('SingleLogoutService')
end
end
end
1 change: 0 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
require 'rspec'
require 'capybara/rspec'
require 'capybara/rails'
require 'pry-byebug'

require 'ruby-saml'
require 'saml_idp'
Expand Down

0 comments on commit 8d0bedc

Please sign in to comment.