Sha256: e86281384e42703ddda3b772c4456d104159aaa409330f578212da0f12456ba3

Contents?: true

Size: 926 Bytes

Versions: 28

Compression:

Stored size: 926 Bytes

Contents

# frozen_string_literal: true

require 'saml2/status_response'

module SAML2
  class LogoutResponse < StatusResponse
    # @param logout_request [LogoutRequest]
    # @param sso [SSO]
    # @param issuer [NameID]
    # @param status_code [String]
    # @return [LogoutResponse]
    def self.respond_to(logout_request, sso, issuer, status_code = Status::SUCCESS)
      logout_response = new
      logout_response.issuer = issuer
      logout_response.destination = sso.single_logout_services.first.location
      logout_response.in_response_to = logout_request.id
      logout_response.status.code = status_code
      logout_response
    end

    private

    def build(builder)
      builder['samlp'].LogoutResponse(
                          'xmlns:samlp' => Namespaces::SAMLP,
                          'xmlns:saml' => Namespaces::SAML
      ) do |logout_response|
        super(logout_response)
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
saml2-3.1.2 lib/saml2/logout_response.rb
saml2-3.1.1 lib/saml2/logout_response.rb
saml2-3.1.0 lib/saml2/logout_response.rb
saml2-3.0.11 lib/saml2/logout_response.rb
saml2-3.0.10 lib/saml2/logout_response.rb
saml2-3.0.9 lib/saml2/logout_response.rb
saml2-3.0.8 lib/saml2/logout_response.rb
saml2-3.0.7 lib/saml2/logout_response.rb
saml2-3.0.6 lib/saml2/logout_response.rb
saml2-3.0.5 lib/saml2/logout_response.rb
saml2-3.0.4 lib/saml2/logout_response.rb
saml2-3.0.2 lib/saml2/logout_response.rb
saml2-3.0.1 lib/saml2/logout_response.rb
saml2-3.0.0 lib/saml2/logout_response.rb
saml2-2.2.12 lib/saml2/logout_response.rb
saml2-2.2.11 lib/saml2/logout_response.rb
saml2-2.2.10 lib/saml2/logout_response.rb
saml2-2.2.9 lib/saml2/logout_response.rb
saml2-2.2.8 lib/saml2/logout_response.rb
saml2-2.2.7 lib/saml2/logout_response.rb