Class: SAML::Core::Assertion
- Inherits:
-
Object
- Object
- SAML::Core::Assertion
- Defined in:
- lib/saml/core/assertion.rb
Instance Attribute Summary collapse
-
#attribute_statement ⇒ Object
readonly
Returns the value of attribute attribute_statement.
-
#authn_statements ⇒ Object
readonly
Returns the value of attribute authn_statements.
-
#conditions ⇒ Object
readonly
Returns the value of attribute conditions.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#issue_instant ⇒ Object
readonly
Returns the value of attribute issue_instant.
-
#issuer ⇒ Object
readonly
Returns the value of attribute issuer.
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Class Method Summary collapse
Instance Method Summary collapse
- #from_xml(xml) ⇒ Object
-
#initialize ⇒ Assertion
constructor
A new instance of Assertion.
Constructor Details
#initialize ⇒ Assertion
Returns a new instance of Assertion.
17 18 19 |
# File 'lib/saml/core/assertion.rb', line 17 def initialize @authn_statements = [] end |
Instance Attribute Details
#attribute_statement ⇒ Object (readonly)
Returns the value of attribute attribute_statement.
11 12 13 |
# File 'lib/saml/core/assertion.rb', line 11 def attribute_statement @attribute_statement end |
#authn_statements ⇒ Object (readonly)
Returns the value of attribute authn_statements.
12 13 14 |
# File 'lib/saml/core/assertion.rb', line 12 def authn_statements @authn_statements end |
#conditions ⇒ Object (readonly)
Returns the value of attribute conditions.
13 14 15 |
# File 'lib/saml/core/assertion.rb', line 13 def conditions @conditions end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/saml/core/assertion.rb', line 5 def id @id end |
#issue_instant ⇒ Object (readonly)
Returns the value of attribute issue_instant.
7 8 9 |
# File 'lib/saml/core/assertion.rb', line 7 def issue_instant @issue_instant end |
#issuer ⇒ Object (readonly)
Returns the value of attribute issuer.
8 9 10 |
# File 'lib/saml/core/assertion.rb', line 8 def issuer @issuer end |
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
10 11 12 |
# File 'lib/saml/core/assertion.rb', line 10 def subject @subject end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
6 7 8 |
# File 'lib/saml/core/assertion.rb', line 6 def version @version end |
Class Method Details
.from_xml(xml) ⇒ Object
15 |
# File 'lib/saml/core/assertion.rb', line 15 def self.from_xml(xml); new.from_xml(xml); end |
Instance Method Details
#from_xml(xml) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/saml/core/assertion.rb', line 21 def from_xml(xml) @id = xml.attributes['ID'] @version = xml.attributes['Version'] @issue_instant = xml.attributes['IssueInstant'] subject_element = xml.get_elements('saml:Subject') unless subject_element.empty? # @subject = Subject.from_xml(subject_element.first) end attribute_statements = xml.get_elements('saml:AttributeStatement') unless attribute_statements.empty? @attribute_statement = AttributeStatement.from_xml(attribute_statements.first) end xml.get_elements('saml:AuthnStatement').each do |as| @authn_statements << AuthnStatement.from_xml(as) end self end |