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

Instance Method Summary collapse

Instance Attribute Details

#request_idObject (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_toObject

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_codeObject

Returns the /Status/[email protected]


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_messageObject

Returns the /Status/StatusMessage


28
29
30
# File 'lib/saml/kit/concerns/respondable.rb', line 28

def status_message
  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