Class: Saml::Kit::Builders::LogoutRequest

Inherits:
Object
  • Object
show all
Includes:
Templatable
Defined in:
lib/saml/kit/builders/logout_request.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(user, configuration: Saml::Kit.configuration) ⇒ LogoutRequest

Returns a new instance of LogoutRequest.



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

def initialize(user, configuration: Saml::Kit.configuration)
  @configuration = configuration
  @user = user
  @id = "_#{SecureRandom.uuid}"
  @issuer = configuration.issuer
  @name_id_format = Saml::Kit::Namespaces::PERSISTENT
  @now = Time.now.utc
  @version = "2.0"
end

Instance Attribute Details

#configurationObject (readonly)

Returns the value of attribute configuration.



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

def configuration
  @configuration
end

#destinationObject

Returns the value of attribute destination.



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

def destination
  @destination
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#issuerObject

Returns the value of attribute issuer.



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

def issuer
  @issuer
end

#name_id_formatObject

Returns the value of attribute name_id_format.



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

def name_id_format
  @name_id_format
end

#nowObject

Returns the value of attribute now.



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

def now
  @now
end

#userObject (readonly)

Returns the value of attribute user.



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

def user
  @user
end

#versionObject

Returns the value of attribute version.



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

def version
  @version
end

Instance Method Details

#buildObject



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

def build
  Saml::Kit::LogoutRequest.new(to_xml, configuration: configuration)
end