Module: Saml::Kit::Respondable
- Extended by:
- ActiveSupport::Concern
- Included in:
- LogoutResponse, Response
- Defined in:
- lib/saml/kit/concerns/respondable.rb
Overview
This module provides the behaviours associated with SAML Response documents. .e.g. Response, LogoutResponse
Instance Attribute Summary collapse
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
Instance Method Summary collapse
-
#in_response_to ⇒ Object
Returns the /InResponseTo attribute.
-
#status_code ⇒ Object
Returns the /Status/StatusCode@Value.
-
#status_message ⇒ Object
Returns the /Status/StatusMessage.
-
#success? ⇒ Boolean
Returns true if the Status code is #Namespaces::SUCCESS.
Instance Attribute Details
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
10 11 12 |
# File 'lib/saml/kit/concerns/respondable.rb', line 10 def request_id @request_id end |
Instance Method Details
#in_response_to ⇒ Object
Returns the /InResponseTo attribute.
33 34 35 |
# File 'lib/saml/kit/concerns/respondable.rb', line 33 def in_response_to at_xpath('./*/@InResponseTo').try(:value) end |
#status_code ⇒ Object
Returns the /Status/StatusCode@Value
23 24 25 |
# File 'lib/saml/kit/concerns/respondable.rb', line 23 def status_code at_xpath('./*/samlp:Status/samlp:StatusCode/@Value').try(:value) end |
#status_message ⇒ Object
Returns the /Status/StatusMessage
28 29 30 |
# File 'lib/saml/kit/concerns/respondable.rb', line 28 def at_xpath('./*/samlp:Status/samlp:StatusMessage').try(:text) end |
#success? ⇒ Boolean
Returns true if the Status code is #Namespaces::SUCCESS
38 39 40 |
# File 'lib/saml/kit/concerns/respondable.rb', line 38 def success? Namespaces::SUCCESS == status_code end |