Skip to content

Commit

Permalink
Fix update_from_saml_metadata() overwriting saml_idp_sso_binding_urn
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Dolski committed Mar 4, 2024
1 parent 08f6660 commit e120336
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/models/institution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -807,9 +807,11 @@ def update_from_saml_metadata(metadata_xml_file)
self.saml_idp_sso_post_service_url = node.attr("Location")
end
end
self.saml_idp_sso_binding_urn = self.saml_idp_sso_post_service_url.present? ?
"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" :
"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
if self.saml_idp_sso_binding_urn.blank?
self.saml_idp_sso_binding_urn = self.saml_idp_sso_redirect_service_url.present? ?
"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" :
"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
end

# IdP cert(s) - there should be at most 4 (two each for signing and
# encryption).
Expand Down

0 comments on commit e120336

Please sign in to comment.