Class: SAML2::LogoutResponse

Inherits:
StatusResponse show all
Defined in:
lib/saml2/logout_response.rb

Instance Attribute Summary

Attributes inherited from StatusResponse

#in_response_to, #status

Attributes inherited from Message

#destination, #errors, #issuer

Attributes inherited from Base

#xml

Class Method Summary collapse

Methods inherited from StatusResponse

#from_xml, #initialize

Methods inherited from Message

from_xml, #from_xml, #id, #initialize, #issue_instant, parse, #sign, #valid_schema?, #validate

Methods included from Signable

#sign, #signature, #signed?, #signing_key, #valid_signature?, #validate_signature

Methods inherited from Base

#decrypt, #from_xml, from_xml, #initialize, #inspect, load_object_array, load_string_array, lookup_qname, #to_s, #to_xml

Constructor Details

This class inherits a constructor from SAML2::StatusResponse

Class Method Details

.respond_to(logout_request, sso, issuer, status_code = Status::SUCCESS) ⇒ LogoutResponse

Parameters:

  • logout_request (LogoutRequest)
  • sso (SSO)
  • issuer (NameID)
  • status_code (String) (defaults to: Status::SUCCESS)

Returns:



12
13
14
15
16
17
18
19
# File 'lib/saml2/logout_response.rb', line 12

def self.respond_to(logout_request, sso, issuer, status_code = Status::SUCCESS)
  logout_response = new
  logout_response.issuer = issuer
  logout_response.destination = sso.single_logout_services.first.location
  logout_response.in_response_to = logout_request.id
  logout_response.status.code = status_code
  logout_response
end