Class: Spid::Slo::IdpRequest
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:) ⇒ IdpRequest
Returns a new instance of IdpRequest.
12
13
14
15
16
|
# File 'lib/spid/slo/idp_request.rb', line 12
def initialize(body:, session_index:)
@body = body
@saml_message = decode_and_inflate(body)
@session_index = session_index
end
|
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
8
9
10
|
# File 'lib/spid/slo/idp_request.rb', line 8
def body
@body
end
|
#saml_message ⇒ Object
Returns the value of attribute saml_message.
9
10
11
|
# File 'lib/spid/slo/idp_request.rb', line 9
def saml_message
@saml_message
end
|
#session_index ⇒ Object
Returns the value of attribute session_index.
10
11
12
|
# File 'lib/spid/slo/idp_request.rb', line 10
def session_index
@session_index
end
|
Instance Method Details
#identity_provider ⇒ Object
#idp_logout_request ⇒ Object
58
59
60
61
62
63
64
65
|
# File 'lib/spid/slo/idp_request.rb', line 58
def idp_logout_request
@idp_logout_request ||=
begin
Spid::Saml2::IdpLogoutRequest.new(
saml_message: saml_message
)
end
end
|
#idp_logout_response ⇒ Object
67
68
69
70
71
72
73
74
75
|
# File 'lib/spid/slo/idp_request.rb', line 67
def idp_logout_response
@idp_logout_response ||=
begin
Spid::Saml2::IdpLogoutResponse.new(
settings: settings,
request_uuid: idp_logout_request.id
)
end
end
|
#issuer ⇒ Object
38
39
40
|
# File 'lib/spid/slo/idp_request.rb', line 38
def issuer
idp_logout_request.issuer
end
|
#response ⇒ Object
18
19
20
21
22
|
# File 'lib/spid/slo/idp_request.rb', line 18
def response
[
idp_logout_response.to_saml
]
end
|
#service_provider ⇒ Object
33
34
35
36
|
# File 'lib/spid/slo/idp_request.rb', line 33
def service_provider
@service_provider ||=
Spid.configuration.service_provider
end
|
#settings ⇒ Object
42
43
44
45
46
47
|
# File 'lib/spid/slo/idp_request.rb', line 42
def settings
@settings ||= Spid::Saml2::Settings.new(
service_provider: service_provider,
identity_provider: identity_provider
)
end
|
#valid? ⇒ Boolean
24
25
26
|
# File 'lib/spid/slo/idp_request.rb', line 24
def valid?
validator.call
end
|
#validator ⇒ Object
49
50
51
52
53
54
55
56
|
# File 'lib/spid/slo/idp_request.rb', line 49
def validator
@validator ||=
begin
Spid::Saml2::IdpLogoutRequestValidator.new(
request: idp_logout_request
)
end
end
|