Class: RSAML::Protocol::IDPList
- Inherits:
-
Object
- Object
- RSAML::Protocol::IDPList
- Defined in:
- lib/rsaml/protocol/idp_list.rb
Overview
Specifies the identity providers trusted by the requester to authenticate the presenter.
Instance Method Summary collapse
-
#idp_entries ⇒ Object
Information about identity providers.
-
#initialize(*idp_entries) ⇒ IDPList
constructor
Initialize the IDP list.
-
#to_xml(xml = Builder::XmlMarkup.new) ⇒ Object
Construct an XML fragment representing the idp list.
-
#validate ⇒ Object
Validate the IDPList structure.
Constructor Details
#initialize(*idp_entries) ⇒ IDPList
Initialize the IDP list
6 7 8 |
# File 'lib/rsaml/protocol/idp_list.rb', line 6 def initialize(*idp_entries) @idp_entries = idp_entries end |
Instance Method Details
#idp_entries ⇒ Object
Information about identity providers.
11 12 13 |
# File 'lib/rsaml/protocol/idp_list.rb', line 11 def idp_entries @idp_entries ||= [] end |
#to_xml(xml = Builder::XmlMarkup.new) ⇒ Object
Construct an XML fragment representing the idp list
21 22 23 24 25 |
# File 'lib/rsaml/protocol/idp_list.rb', line 21 def to_xml(xml=Builder::XmlMarkup.new) xml.tag!('samlp:IDPList') { idp_entries.each { |idp_entry| xml << idp_entry.to_xml } } end |
#validate ⇒ Object
Validate the IDPList structure.
16 17 18 |
# File 'lib/rsaml/protocol/idp_list.rb', line 16 def validate raise ValidationError, "At least one IDP entry is required" if idp_entries.empty? end |