Class: RSAML::Protocol::Query::SubjectQuery

Inherits:
Request show all
Defined in:
lib/rsaml/protocol/query/subject_query.rb

Overview

Extension point that allows new SAML queries to be defined that specify a single SAML subject. This class should not be instantiated directly.

Direct Known Subclasses

AttributeQuery, AuthnQuery, AuthzDecisionQuery

Instance Attribute Summary collapse

Attributes inherited from Message

#consent, #destination, #id, #issue_instant, #issuer, #signature, #version

Instance Method Summary collapse

Methods inherited from Request

#respond, #to_xml

Methods inherited from Message

#extensions

Constructor Details

#initialize(subject) ⇒ SubjectQuery

Initialize the subject query



11
12
13
# File 'lib/rsaml/protocol/query/subject_query.rb', line 11

def initialize(subject)
  @subject = subject
end

Instance Attribute Details

#subjectObject

The subject



8
9
10
# File 'lib/rsaml/protocol/query/subject_query.rb', line 8

def subject
  @subject
end

Instance Method Details

#validateObject

Validate the subject query structure.

Raises:



16
17
18
# File 'lib/rsaml/protocol/query/subject_query.rb', line 16

def validate
  raise ValidationError, "Subject is required" if subject.nil?
end