Class: Saml::Response
Instance Method Summary
collapse
#initialize, #success?
#initialize, #provider
Methods included from XMLHelpers
#add_signature, #to_soap, #to_xml
Instance Method Details
#assertion ⇒ Object
31
32
33
|
# File 'lib/saml/response.rb', line 31
def assertion
assertions.first
end
|
#assertion=(assertion) ⇒ Object
35
36
37
|
# File 'lib/saml/response.rb', line 35
def assertion=(assertion)
(self.assertions ||= []) << assertion
end
|
#authn_failed? ⇒ Boolean
9
10
11
|
# File 'lib/saml/response.rb', line 9
def authn_failed?
!success? && status.status_code.authn_failed?
end
|
#encrypt_assertions(certificate) ⇒ Object
21
22
23
24
25
26
27
28
29
|
# File 'lib/saml/response.rb', line 21
def encrypt_assertions(certificate)
@encrypted_assertions = []
assertions.each do |assertion|
assertion_xml = assertion.is_a?(Assertion) ? assertion.to_xml : assertion.to_s
@encrypted_assertions << Saml::Util.encrypt_assertion(assertion_xml, certificate)
end
assertions.clear
end
|
#encrypted_assertion ⇒ Object
39
40
41
|
# File 'lib/saml/response.rb', line 39
def encrypted_assertion
encrypted_assertions.first
end
|
#encrypted_assertion=(encrypted_assertion) ⇒ Object
43
44
45
|
# File 'lib/saml/response.rb', line 43
def encrypted_assertion=(encrypted_assertion)
(self.encrypted_assertions ||= []) << encrypted_assertion
end
|
#no_authn_context? ⇒ Boolean
17
18
19
|
# File 'lib/saml/response.rb', line 17
def no_authn_context?
!success? && status.status_code.no_authn_context?
end
|
#request_denied? ⇒ Boolean
13
14
15
|
# File 'lib/saml/response.rb', line 13
def request_denied?
!success? && status.status_code.request_denied?
end
|