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

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

Overview

Constant Summary

Constants included from XmlTemplatable

XmlTemplatable::TEMPLATES_DIR

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from XmlTemplatable

#digest_method, #sign?, #signature_method, #signing_key_pair, #template_name, #template_path

Constructor Details

#initialize(user, configuration: Saml::Kit.configuration) ⇒ LogoutRequest

Returns a new instance of LogoutRequest.



14
15
16
17
18
19
20
21
22
# File 'lib/saml/kit/builders/logout_request.rb', line 14

def initialize(user, configuration: Saml::Kit.configuration)
  @configuration = configuration
  @user = user
  @id = ::Xml::Kit::Id.generate
  @issuer = configuration.entity_id
  @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.



12
13
14
# File 'lib/saml/kit/builders/logout_request.rb', line 12

def configuration
  @configuration
end

#destinationObject

Returns the value of attribute destination.



10
11
12
# File 'lib/saml/kit/builders/logout_request.rb', line 10

def destination
  @destination
end

#idObject

Returns the value of attribute id.



10
11
12
# File 'lib/saml/kit/builders/logout_request.rb', line 10

def id
  @id
end

#issuerObject

Returns the value of attribute issuer.



10
11
12
# File 'lib/saml/kit/builders/logout_request.rb', line 10

def issuer
  @issuer
end

#name_id_formatObject

Returns the value of attribute name_id_format.



10
11
12
# File 'lib/saml/kit/builders/logout_request.rb', line 10

def name_id_format
  @name_id_format
end

#nowObject

Returns the value of attribute now.



10
11
12
# File 'lib/saml/kit/builders/logout_request.rb', line 10

def now
  @now
end

#userObject (readonly)

Returns the value of attribute user.



12
13
14
# File 'lib/saml/kit/builders/logout_request.rb', line 12

def user
  @user
end

#versionObject

Returns the value of attribute version.



11
12
13
# File 'lib/saml/kit/builders/logout_request.rb', line 11

def version
  @version
end

Instance Method Details

#buildObject



24
25
26
# File 'lib/saml/kit/builders/logout_request.rb', line 24

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