6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/udap_security_test_kit/endpoints/mock_udap_server/udap_registration_response_creation.rb', line 6
def make_udap_registration_response
parsed_body = MockUDAPServer.parsed_io_body(request)
client_id = MockUDAPServer.client_uri_to_client_id(
MockUDAPServer.udap_client_uri_from_registration_payload(parsed_body)
)
ss_jwt = MockUDAPServer.udap_software_statement_jwt(parsed_body)
response_body = {
client_id:,
software_statement: ss_jwt
}
response_body.merge!(MockUDAPServer.jwt_claims(ss_jwt).except(['iss', 'sub', 'exp', 'iat', 'jti']))
response.body = response_body.to_json
response.['Cache-Control'] = 'no-store'
response.['Pragma'] = 'no-cache'
response.['Access-Control-Allow-Origin'] = '*'
response.content_type = 'application/json'
response.status = 201
end
|