Sha256: 8836390e8a05751221994625cf654affaa5a0648fb25fbe413fade82661097aa

Contents?: true

Size: 949 Bytes

Versions: 13

Compression:

Stored size: 949 Bytes

Contents

require 'saml_idp/logout_builder'
module SamlIdp
  class LogoutResponseBuilder < LogoutBuilder
    attr_accessor :saml_request_id

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

    def build
      builder = Builder::XmlMarkup.new
      builder.LogoutResponse ID: response_id_string,
        Version: "2.0",
        IssueInstant: now_iso,
        Destination: saml_slo_url,
        InResponseTo: saml_request_id,
        xmlns: Saml::XML::Namespaces::PROTOCOL do |response|
          response.Issuer issuer_uri, xmlns: Saml::XML::Namespaces::ASSERTION
          sign response
          response.Status xmlns: Saml::XML::Namespaces::PROTOCOL do |status|
            status.StatusCode Value: Saml::XML::Namespaces::Statuses::SUCCESS
          end
        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_response_builder.rb
saml_idp-0.15.0 lib/saml_idp/logout_response_builder.rb
saml_idp-0.14.0 lib/saml_idp/logout_response_builder.rb
saml_idp-0.12.0 lib/saml_idp/logout_response_builder.rb
saml_idp-0.11.0 lib/saml_idp/logout_response_builder.rb
saml_idp-0.10.0 lib/saml_idp/logout_response_builder.rb
saml_idp-0.9.0 lib/saml_idp/logout_response_builder.rb
saml_idp-0.8.1 lib/saml_idp/logout_response_builder.rb
saml_idp-0.8.0 lib/saml_idp/logout_response_builder.rb
saml_idp-0.7.2 lib/saml_idp/logout_response_builder.rb
saml_idp-0.7.1 lib/saml_idp/logout_response_builder.rb
saml_idp-0.7.0 lib/saml_idp/logout_response_builder.rb
saml_idp-0.6.0 lib/saml_idp/logout_response_builder.rb