Sha256: bcb3f929f335ecd1f5eabab91b202092d17b16613a2b6de70258d1b7bd2479d4

Contents?: true

Size: 1011 Bytes

Versions: 6

Compression:

Stored size: 1011 Bytes

Contents

module Saml
  module Kit
    module Builders
      class LogoutResponse
        include Saml::Kit::Templatable
        attr_accessor :id, :issuer, :version, :status_code, :now, :destination
        attr_reader :request
        attr_reader :configuration

        def initialize(request, configuration: Saml::Kit.configuration)
          @configuration = configuration
          @id = Id.generate
          @issuer = configuration.issuer
          @now = Time.now.utc
          @request = request
          @status_code = Namespaces::SUCCESS
          @version = "2.0"
        end

        def build
          Saml::Kit::LogoutResponse.new(to_xml, request_id: request.id)
        end

        private

        def logout_response_options
          {
            xmlns: Namespaces::PROTOCOL,
            ID: id,
            Version: version,
            IssueInstant: now.utc.iso8601,
            Destination: destination,
            InResponseTo: request.id,
          }
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
saml-kit-0.2.17 lib/saml/kit/builders/logout_response.rb
saml-kit-0.2.16 lib/saml/kit/builders/logout_response.rb
saml-kit-0.2.15 lib/saml/kit/builders/logout_response.rb
saml-kit-0.2.14 lib/saml/kit/builders/logout_response.rb
saml-kit-0.2.13 lib/saml/kit/builders/logout_response.rb
saml-kit-0.2.12 lib/saml/kit/builders/logout_response.rb