Class: Saml::Kit::Builders::LogoutResponse

Inherits:
Object
  • Object
show all
Includes:
Templatable
Defined in:
lib/saml/kit/builders/logout_response.rb

Instance Attribute Summary collapse

Attributes included from Templatable

#embed_signature

Instance Method Summary collapse

Methods included from Templatable

#encrypt?, #encryption_for, #render, #sign=, #sign?, #signature_for, #signatures, #to_xml

Constructor Details

#initialize(request, configuration: Saml::Kit.configuration) ⇒ LogoutResponse

Returns a new instance of LogoutResponse.



10
11
12
13
14
15
16
17
18
# File 'lib/saml/kit/builders/logout_response.rb', line 10

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

Instance Attribute Details

#configuration ⇒ Object (readonly)

Returns the value of attribute configuration.



8
9
10
# File 'lib/saml/kit/builders/logout_response.rb', line 8

def configuration
  @configuration
end

#destination ⇒ Object

Returns the value of attribute destination.



6
7
8
# File 'lib/saml/kit/builders/logout_response.rb', line 6

def destination
  @destination
end

#id ⇒ Object

Returns the value of attribute id.



6
7
8
# File 'lib/saml/kit/builders/logout_response.rb', line 6

def id
  @id
end

#issuer ⇒ Object

Returns the value of attribute issuer.



6
7
8
# File 'lib/saml/kit/builders/logout_response.rb', line 6

def issuer
  @issuer
end

#now ⇒ Object

Returns the value of attribute now.



6
7
8
# File 'lib/saml/kit/builders/logout_response.rb', line 6

def now
  @now
end

#request ⇒ Object (readonly)

Returns the value of attribute request.



7
8
9
# File 'lib/saml/kit/builders/logout_response.rb', line 7

def request
  @request
end

#status_code ⇒ Object

Returns the value of attribute status_code.



6
7
8
# File 'lib/saml/kit/builders/logout_response.rb', line 6

def status_code
  @status_code
end

#version ⇒ Object

Returns the value of attribute version.



6
7
8
# File 'lib/saml/kit/builders/logout_response.rb', line 6

def version
  @version
end

Instance Method Details

#build ⇒ Object



20
21
22
# File 'lib/saml/kit/builders/logout_response.rb', line 20

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