Class: RSAML::Evidence
- Inherits:
-
Object
- Object
- RSAML::Evidence
- Defined in:
- lib/rsaml/evidence.rb
Overview
Contains one or more assertions or assertion references that the SAML authority relied on in issuing the authorization decision.
Instance Method Summary collapse
-
#assertions ⇒ Object
Specifies an assertion either by reference or by value.
-
#to_xml(xml = Builder::XmlMarkup.new) ⇒ Object
Construct an XML fragment representing the authentication statement.
- #validate ⇒ Object
Instance Method Details
#assertions ⇒ Object
Specifies an assertion either by reference or by value.
6 7 8 |
# File 'lib/rsaml/evidence.rb', line 6 def assertions @assertions ||= [] end |
#to_xml(xml = Builder::XmlMarkup.new) ⇒ Object
Construct an XML fragment representing the authentication statement
15 16 17 18 19 |
# File 'lib/rsaml/evidence.rb', line 15 def to_xml(xml=Builder::XmlMarkup.new) xml.tag!('saml:Evidence') { assertions.each { |assertion| xml << assertion.to_xml } } end |
#validate ⇒ Object
10 11 12 |
# File 'lib/rsaml/evidence.rb', line 10 def validate raise ValidationError, "At least one assertion is required" if assertions.empty? end |