Sha256: c6ca921400a5a639f727adc12c631cd4f5f581ed4292d1da94b34a159bffbd6c

Contents?: true

Size: 904 Bytes

Versions: 13

Compression:

Stored size: 904 Bytes

Contents

require 'saml_idp/logout_builder'
module SamlIdp
  class LogoutRequestBuilder < LogoutBuilder
    attr_accessor :name_id

    def initialize(response_id, issuer_uri, saml_slo_url, name_id, algorithm)
      super(response_id, issuer_uri, saml_slo_url, algorithm)
      self.name_id = name_id
    end

    def build
      builder = Builder::XmlMarkup.new
      builder.LogoutRequest ID: response_id_string,
        Version: "2.0",
        IssueInstant: now_iso,
        Destination: saml_slo_url,
        "xmlns" => Saml::XML::Namespaces::PROTOCOL do |request|
          request.Issuer issuer_uri, xmlns: Saml::XML::Namespaces::ASSERTION
          sign request
          request.NameID name_id, xmlns: Saml::XML::Namespaces::ASSERTION,
            Format: Saml::XML::Namespaces::Formats::NameId::PERSISTENT
          request.SessionIndex response_id_string
        end
    end
    private :build
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
saml_idp-0.16.0 lib/saml_idp/logout_request_builder.rb
saml_idp-0.15.0 lib/saml_idp/logout_request_builder.rb
saml_idp-0.14.0 lib/saml_idp/logout_request_builder.rb
saml_idp-0.12.0 lib/saml_idp/logout_request_builder.rb
saml_idp-0.11.0 lib/saml_idp/logout_request_builder.rb
saml_idp-0.10.0 lib/saml_idp/logout_request_builder.rb
saml_idp-0.9.0 lib/saml_idp/logout_request_builder.rb
saml_idp-0.8.1 lib/saml_idp/logout_request_builder.rb
saml_idp-0.8.0 lib/saml_idp/logout_request_builder.rb
saml_idp-0.7.2 lib/saml_idp/logout_request_builder.rb
saml_idp-0.7.1 lib/saml_idp/logout_request_builder.rb
saml_idp-0.7.0 lib/saml_idp/logout_request_builder.rb
saml_idp-0.6.0 lib/saml_idp/logout_request_builder.rb