Class: Saml::Kit::Builders::Assertion
- Inherits:
-
Object
- Object
- Saml::Kit::Builders::Assertion
- Extended by:
- Forwardable
- Includes:
- XmlTemplatable
- Defined in:
- lib/saml/kit/builders/assertion.rb
Overview
This class is responsible for building a SAML Assertion
Constant Summary
Constants included from XmlTemplatable
Instance Attribute Summary collapse
-
#default_name_id_format ⇒ Object
Returns the value of attribute default_name_id_format.
Instance Method Summary collapse
- #assertion_attributes ⇒ Object
-
#initialize(response_builder, embed_signature) ⇒ Assertion
constructor
A new instance of Assertion.
- #name_id ⇒ Object
- #name_id_format ⇒ Object
- #signing_key_pair ⇒ Object
Methods included from XmlTemplatable
#digest_method, #sign?, #signature_method, #template_name, #template_path
Constructor Details
#initialize(response_builder, embed_signature) ⇒ Assertion
Returns a new instance of Assertion.
18 19 20 21 22 |
# File 'lib/saml/kit/builders/assertion.rb', line 18 def initialize(response_builder, ) @response_builder = response_builder self. = self.default_name_id_format = Saml::Kit::Namespaces::UNSPECIFIED_NAMEID end |
Instance Attribute Details
#default_name_id_format ⇒ Object
Returns the value of attribute default_name_id_format.
16 17 18 |
# File 'lib/saml/kit/builders/assertion.rb', line 16 def default_name_id_format @default_name_id_format end |
Instance Method Details
#assertion_attributes ⇒ Object
32 33 34 35 |
# File 'lib/saml/kit/builders/assertion.rb', line 32 def assertion_attributes return {} unless user.respond_to?(:assertion_attributes_for) user.assertion_attributes_for(request) end |
#name_id ⇒ Object
28 29 30 |
# File 'lib/saml/kit/builders/assertion.rb', line 28 def name_id user.name_id_for(name_id_format) end |
#name_id_format ⇒ Object
24 25 26 |
# File 'lib/saml/kit/builders/assertion.rb', line 24 def name_id_format request.try(:name_id_format) end |
#signing_key_pair ⇒ Object
37 38 39 |
# File 'lib/saml/kit/builders/assertion.rb', line 37 def signing_key_pair super || @response_builder.signing_key_pair end |