Class: Spid::Slo::Response
Overview
Instance Attribute Summary collapse
Instance Method Summary
collapse
#certificate_from_encoded_der, #decode, #decode_and_inflate, #deflate, #deflate_and_encode, #encode, #escaped_params, #escaped_query_string, #inflate, #query_param, #query_params, #query_string
Constructor Details
#initialize(body:, session_index:, request_uuid:) ⇒ Response
Returns a new instance of Response.
13
14
15
16
17
18
|
# File 'lib/spid/slo/response.rb', line 13
def initialize(body:, session_index:, request_uuid:)
@body = body
@session_index = session_index
@request_uuid = request_uuid
@saml_message = decode_and_inflate(body)
end
|
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
8
9
10
|
# File 'lib/spid/slo/response.rb', line 8
def body
@body
end
|
#request_uuid ⇒ Object
Returns the value of attribute request_uuid.
10
11
12
|
# File 'lib/spid/slo/response.rb', line 10
def request_uuid
@request_uuid
end
|
#saml_message ⇒ Object
Returns the value of attribute saml_message.
11
12
13
|
# File 'lib/spid/slo/response.rb', line 11
def saml_message
@saml_message
end
|
#session_index ⇒ Object
Returns the value of attribute session_index.
9
10
11
|
# File 'lib/spid/slo/response.rb', line 9
def session_index
@session_index
end
|
Instance Method Details
#errors ⇒ Object
28
29
30
|
# File 'lib/spid/slo/response.rb', line 28
def errors
validator.errors
end
|
#identity_provider ⇒ Object
#issuer ⇒ Object
53
54
55
|
# File 'lib/spid/slo/response.rb', line 53
def issuer
saml_response.issuer
end
|
#response ⇒ Object
24
25
26
|
# File 'lib/spid/slo/response.rb', line 24
def response
[]
end
|
#saml_response ⇒ Object
64
65
66
67
68
|
# File 'lib/spid/slo/response.rb', line 64
def saml_response
@saml_response ||= Spid::Saml2::LogoutResponse.new(
saml_message: saml_message
)
end
|
#service_provider ⇒ Object
48
49
50
51
|
# File 'lib/spid/slo/response.rb', line 48
def service_provider
@service_provider ||=
Spid.configuration.service_provider
end
|
#settings ⇒ Object
57
58
59
60
61
62
|
# File 'lib/spid/slo/response.rb', line 57
def settings
@settings ||= Spid::Saml2::Settings.new(
service_provider: service_provider,
identity_provider: identity_provider
)
end
|
#valid? ⇒ Boolean
20
21
22
|
# File 'lib/spid/slo/response.rb', line 20
def valid?
validator.call
end
|
#validator ⇒ Object
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/spid/slo/response.rb', line 32
def validator
@validator ||=
begin
Spid::Saml2::LogoutResponseValidator.new(
response: saml_response,
settings: settings,
request_uuid: request_uuid
)
end
end
|