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
51
52
53
|
# File 'lib/saml/response.rb', line 51
def assertion
assertions.first
end
|
#assertion=(assertion) ⇒ Object
55
56
57
|
# File 'lib/saml/response.rb', line 55
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
43
44
45
46
47
48
49
|
# File 'lib/saml/response.rb', line 43
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(key_descriptor_or_certificate, include_certificate: false, include_key_retrieval_method: false) ⇒ Object
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/saml/response.rb', line 31
def encrypt_assertions(key_descriptor_or_certificate, include_certificate: false, include_key_retrieval_method: false)
@encrypted_assertions = []
assertions.each do |assertion|
@encrypted_assertions << Saml::Util.encrypt_assertion(
assertion, key_descriptor_or_certificate,
include_certificate: include_certificate,
include_key_retrieval_method: include_key_retrieval_method
)
end
assertions.clear
end
|
#encrypted_assertion ⇒ Object
59
60
61
|
# File 'lib/saml/response.rb', line 59
def encrypted_assertion
encrypted_assertions.first
end
|
#encrypted_assertion=(encrypted_assertion) ⇒ Object
63
64
65
|
# File 'lib/saml/response.rb', line 63
def encrypted_assertion=(encrypted_assertion)
(self.encrypted_assertions ||= []) << encrypted_assertion
end
|
#no_authn_context? ⇒ Boolean
23
24
25
|
# File 'lib/saml/response.rb', line 23
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
|
#request_unsupported? ⇒ Boolean
19
20
21
|
# File 'lib/saml/response.rb', line 19
def request_unsupported?
!success? && status.status_code.request_unsupported?
end
|
#unknown_principal? ⇒ Boolean
27
28
29
|
# File 'lib/saml/response.rb', line 27
def unknown_principal?
!success? && status.status_code.unknown_principal?
end
|