Class: Saml::Kit::LogoutRequest
- Includes:
- Requestable
- Defined in:
- lib/saml/kit/logout_request.rb
Constant Summary collapse
- Builder =
ActiveSupport::Deprecation::DeprecatedConstantProxy.new('Saml::Kit::LogoutRequest::Builder', 'Saml::Kit::Builders::LogoutRequest')
Constants inherited from Document
Instance Attribute Summary
Attributes inherited from Document
Instance Method Summary collapse
-
#initialize(xml) ⇒ LogoutRequest
constructor
A new instance of LogoutRequest.
- #name_id ⇒ Object
- #response_for(user, binding:, relay_state: nil) ⇒ Object
- #single_logout_service ⇒ Object
Methods included from Requestable
Methods inherited from Document
builder_class, #destination, #expected_type?, #id, #issue_instant, #issuer, #to_h, #to_s, to_saml_document, #to_xhtml, #to_xml, #version
Methods included from Trustable
#certificate, #fingerprint, #provider, #signature_verified!, #signed?, #trusted?
Methods included from XsdValidatable
Constructor Details
#initialize(xml) ⇒ LogoutRequest
Returns a new instance of LogoutRequest.
7 8 9 |
# File 'lib/saml/kit/logout_request.rb', line 7 def initialize(xml) super(xml, name: "LogoutRequest") end |
Instance Method Details
#name_id ⇒ Object
11 12 13 |
# File 'lib/saml/kit/logout_request.rb', line 11 def name_id to_h[name]['NameID'] end |
#response_for(user, binding:, relay_state: nil) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/saml/kit/logout_request.rb', line 21 def response_for(user, binding:, relay_state: nil) builder = Saml::Kit::LogoutResponse.builder(user, 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 |
#single_logout_service ⇒ Object
15 16 17 18 19 |
# File 'lib/saml/kit/logout_request.rb', line 15 def single_logout_service return if provider.nil? urls = provider.single_logout_services urls.first end |