Class: Saml::Kit::LogoutRequest
- Includes:
- Requestable
- Defined in:
- lib/saml/kit/logout_request.rb
Overview
This class parses a LogoutRequest SAML document.
Constant Summary collapse
- Builder =
Deprecated.
Use Builders::LogoutRequest instead of this.
ActiveSupport::Deprecation::DeprecatedConstantProxy.new('Saml::Kit::LogoutRequest::Builder', 'Saml::Kit::Builders::LogoutRequest')
Constants inherited from Document
Instance Method Summary collapse
-
#initialize(xml, configuration: Saml::Kit.configuration) ⇒ LogoutRequest
constructor
A new instance of LogoutRequest.
-
#name_id ⇒ Object
Returns the NameID value.
-
#response_for(binding:, relay_state: nil) ⇒ Array
Generates a Serialized LogoutResponse using the encoding rules for the specified binding.
Methods inherited from Document
#destination, #id, #issue_instant, #issuer, #to_h, #to_s, to_saml_document, #to_xhtml, #to_xml, #version
Methods included from Trustable
Constructor Details
#initialize(xml, configuration: Saml::Kit.configuration) ⇒ LogoutRequest
Returns a new instance of LogoutRequest.
8 9 10 |
# File 'lib/saml/kit/logout_request.rb', line 8 def initialize(xml, configuration: Saml::Kit.configuration) super(xml, name: "LogoutRequest", configuration: configuration) end |
Instance Method Details
#name_id ⇒ Object
Returns the NameID value.
13 14 15 |
# File 'lib/saml/kit/logout_request.rb', line 13 def name_id to_h[name]['NameID'] end |
#response_for(binding:, relay_state: nil) ⇒ Array
Generates a Serialized LogoutResponse using the encoding rules for the specified binding.
22 23 24 25 26 27 28 |
# File 'lib/saml/kit/logout_request.rb', line 22 def response_for(binding:, relay_state: nil) builder = Saml::Kit::LogoutResponse.builder(self) do |x| yield x if block_given? end response_binding = provider.single_logout_service_for(binding: binding) response_binding.serialize(builder, relay_state: relay_state) end |