Skip to content

Commit

Permalink
Merge pull request #246 from stian-fredrikstad/master
Browse files Browse the repository at this point in the history
On LogoutResponse, the issuer has to be before the status.
  • Loading branch information
pitbulk committed Jun 30, 2015
2 parents 4fa2ed9 + 5571dd5 commit 0aed0dc
Showing 1 changed file with 5 additions and 5 deletions.
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

0 comments on commit 0aed0dc

Please sign in to comment.