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
37
38
39
|
# File 'lib/saml/response.rb', line 37
def assertion
assertions.first
end
|
#assertion=(assertion) ⇒ Object
41
42
43
|
# File 'lib/saml/response.rb', line 41
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
|
#decrypt_assertions(private_key) ⇒ Object
29
30
31
32
33
34
35
|
# File 'lib/saml/response.rb', line 29
def decrypt_assertions(private_key)
@assertions ||= []
encrypted_assertions.each do |encrypted_assertion|
@assertions << Saml::Util.decrypt_assertion(encrypted_assertion, private_key)
end
encrypted_assertions.clear
end
|
#encrypt_assertions(certificate) ⇒ Object
21
22
23
24
25
26
27
|
# File 'lib/saml/response.rb', line 21
def encrypt_assertions(certificate)
@encrypted_assertions = []
assertions.each do |assertion|
@encrypted_assertions << Saml::Util.encrypt_assertion(assertion, certificate)
end
assertions.clear
end
|
#encrypted_assertion ⇒ Object
45
46
47
|
# File 'lib/saml/response.rb', line 45
def encrypted_assertion
encrypted_assertions.first
end
|
#encrypted_assertion=(encrypted_assertion) ⇒ Object
49
50
51
|
# File 'lib/saml/response.rb', line 49
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
|