Class: RSAML::Protocol::Query::AuthnQuery
- Inherits:
-
SubjectQuery
- Object
- Message
- Request
- SubjectQuery
- RSAML::Protocol::Query::AuthnQuery
- Defined in:
- lib/rsaml/protocol/query/authn_query.rb
Overview
An AuthnQuery is used to make the query “What assertions containing authentication statements are available for this subject?” A successful response will contain one or more assertions containing authentication statements.
Instance Attribute Summary collapse
-
#requested_authn_context ⇒ Object
If present, specifies a filter for possible responses.
-
#session_index ⇒ Object
If present, specifies a filter for possible responses.
Attributes inherited from SubjectQuery
Attributes inherited from Message
#consent, #destination, #id, #issue_instant, #issuer, #signature, #version
Instance Method Summary collapse
-
#to_xml(xml = Builder::XmlMarkup.new) ⇒ Object
Construct an XML fragment representing the authn query.
Methods inherited from SubjectQuery
Methods inherited from Request
Methods inherited from Message
#extensions, #initialize, #validate
Constructor Details
This class inherits a constructor from RSAML::Protocol::Query::SubjectQuery
Instance Attribute Details
#requested_authn_context ⇒ Object
If present, specifies a filter for possible responses. Such a query asks the question “What assertions containing authentication statements do you have for this subject that satisfy the authentication context requirements in this element?” The value of this attribute MUST be a RequestedAuthnContext instance.
17 18 19 |
# File 'lib/rsaml/protocol/query/authn_query.rb', line 17 def requested_authn_context @requested_authn_context end |
#session_index ⇒ Object
If present, specifies a filter for possible responses. Such a query asks the question “What assertions containing authentication statements do you have for this subject within the context of the supplied session information?” The value of this attribute MUST be a string.
11 12 13 |
# File 'lib/rsaml/protocol/query/authn_query.rb', line 11 def session_index @session_index end |
Instance Method Details
#to_xml(xml = Builder::XmlMarkup.new) ⇒ Object
Construct an XML fragment representing the authn query
20 21 22 23 24 25 26 |
# File 'lib/rsaml/protocol/query/authn_query.rb', line 20 def to_xml(xml=Builder::XmlMarkup.new) attributes = {} attributes['SessionIndex'] = session_index unless session_index.nil? xml.tag!('samlp:AuthnQuery', attributes) { xml << subject.to_xml unless subject.nil? } end |