Class: RSAML::SubjectConfirmation
- Inherits:
-
Object
- Object
- RSAML::SubjectConfirmation
- Defined in:
- lib/rsaml/subject_confirmation.rb
Overview
Provides the means for a relying party to verify the correspondence of the subject of the assertion with the party with whom the relying party is communicating.
Instance Attribute Summary collapse
-
#identifier ⇒ Object
Identifies the entity expected to satisfy the enclosing subject confirmation requirements.
-
#method ⇒ Object
A URI reference that identifies a protocol or mechanism to be used to confirm the subject.
-
#subject_confirmation_data ⇒ Object
Additional confirmation information to be used by a specific confirmation method.
Class Method Summary collapse
-
.methods ⇒ Object
Hash of available SAML methods for subject confirmation.
Instance Method Summary collapse
-
#initialize(method) ⇒ SubjectConfirmation
constructor
A new instance of SubjectConfirmation.
-
#to_xml(xml = Builder::XmlMarkup.new) ⇒ Object
Construct an XML fragment representing the subject confirmation.
Constructor Details
#initialize(method) ⇒ SubjectConfirmation
Returns a new instance of SubjectConfirmation.
24 25 26 |
# File 'lib/rsaml/subject_confirmation.rb', line 24 def initialize(method) @method = method end |
Instance Attribute Details
#identifier ⇒ Object
Identifies the entity expected to satisfy the enclosing subject confirmation requirements.
19 20 21 |
# File 'lib/rsaml/subject_confirmation.rb', line 19 def identifier @identifier end |
#method ⇒ Object
A URI reference that identifies a protocol or mechanism to be used to confirm the subject.
16 17 18 |
# File 'lib/rsaml/subject_confirmation.rb', line 16 def method @method end |
#subject_confirmation_data ⇒ Object
Additional confirmation information to be used by a specific confirmation method.
22 23 24 |
# File 'lib/rsaml/subject_confirmation.rb', line 22 def subject_confirmation_data @subject_confirmation_data end |
Class Method Details
.methods ⇒ Object
Hash of available SAML methods for subject confirmation
7 8 9 10 11 12 13 |
# File 'lib/rsaml/subject_confirmation.rb', line 7 def self.methods { :holder_of_key => 'urn:oasis:names:tc:SAML:2.0:cm:holder-of-key', :sender_vouches => 'urn:oasis:names:tc:SAML:2.0:cm:sender-vouches', :bearer => 'urn:oasis:names:tc:SAML:2.0:cm:bearer' } end |
Instance Method Details
#to_xml(xml = Builder::XmlMarkup.new) ⇒ Object
Construct an XML fragment representing the subject confirmation
29 30 31 32 33 |
# File 'lib/rsaml/subject_confirmation.rb', line 29 def to_xml(xml=Builder::XmlMarkup.new) attributes = {'Method' => method} subject_confirmation_data_block = Proc.new { xml << subject_confirmation_data.to_xml} if subject_confirmation_data xml.tag!('saml:SubjectConfirmation', attributes, &subject_confirmation_data_block) end |