Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

According to the xsd, the issuer has to be before the status #246

Merged
merged 2 commits into from
Jun 30, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/onelogin/ruby-saml/slo_logoutresponse.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ def create_logout_response_xml_doc(settings, request_id = nil, logout_message =
root.attributes['InResponseTo'] = request_id unless request_id.nil?
root.attributes['Destination'] = settings.idp_slo_target_url unless settings.idp_slo_target_url.nil?

if settings.issuer != nil
issuer = root.add_element "saml:Issuer"
issuer.text = settings.issuer
end

# add success message
status = root.add_element 'samlp:Status'

Expand All @@ -116,11 +121,6 @@ def create_logout_response_xml_doc(settings, request_id = nil, logout_message =
status_message = status.add_element 'samlp:StatusMessage'
status_message.text = logout_message

if settings.issuer != nil
issuer = root.add_element "saml:Issuer"
issuer.text = settings.issuer
end

# embed signature
if settings.security[:logout_responses_signed] && settings.private_key && settings.certificate && settings.security[:embed_sign]
private_key = settings.get_sp_key
Expand Down