Class: Saml::Response
Instance Attribute Summary collapse
Instance Method Summary
collapse
#initialize, #success?
#initialize, #provider
Methods included from XMLHelpers
#add_signature, #to_soap, #to_xml
Instance Attribute Details
#xml_value ⇒ Object
Returns the value of attribute xml_value.
5
6
7
|
# File 'lib/saml/response.rb', line 5
def xml_value
@xml_value
end
|
Instance Method Details
#assertion ⇒ Object
43
44
45
|
# File 'lib/saml/response.rb', line 43
def assertion
assertions.first
end
|
#assertion=(assertion) ⇒ Object
47
48
49
|
# File 'lib/saml/response.rb', line 47
def assertion=(assertion)
(self.assertions ||= []) << assertion
end
|
#authn_failed? ⇒ Boolean
11
12
13
|
# File 'lib/saml/response.rb', line 11
def authn_failed?
!success? && status.status_code.authn_failed?
end
|
#decrypt_assertions(private_key) ⇒ Object
35
36
37
38
39
40
41
|
# File 'lib/saml/response.rb', line 35
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
27
28
29
30
31
32
33
|
# File 'lib/saml/response.rb', line 27
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
51
52
53
|
# File 'lib/saml/response.rb', line 51
def encrypted_assertion
encrypted_assertions.first
end
|
#encrypted_assertion=(encrypted_assertion) ⇒ Object
55
56
57
|
# File 'lib/saml/response.rb', line 55
def encrypted_assertion=(encrypted_assertion)
(self.encrypted_assertions ||= []) << encrypted_assertion
end
|
#no_authn_context? ⇒ Boolean
19
20
21
|
# File 'lib/saml/response.rb', line 19
def no_authn_context?
!success? && status.status_code.no_authn_context?
end
|
#request_denied? ⇒ Boolean
15
16
17
|
# File 'lib/saml/response.rb', line 15
def request_denied?
!success? && status.status_code.request_denied?
end
|
#unknown_principal? ⇒ Boolean
23
24
25
|
# File 'lib/saml/response.rb', line 23
def unknown_principal?
!success? && status.status_code.unknown_principal?
end
|