Closed
Description
Describe the bug
When OidcBackChannelLogoutWebFilter returns an error from handleAuthenticationFailure(...) method:
- the response content type is not set to "application/json";
- error_uri is missing closing quotes;
- the text for at least the description should be escaped for special characters.
To Reproduce
Call the oidc back channel logout endpoint without a logout token for example. The response is:
{
"error_code": "invalid_request",
"error_description": "An error occurred while attempting to decode the Jwt: Cannot invoke "String.indexOf(String)" because "s" is null",
"error_uri: "https://openid.net/specs/openid-connect-backchannel-1_0.html#Validation"
}
Expected behavior
The expected response should look like this:
{
"error_code": "invalid_request",
"error_description": "An error occurred while attempting to decode the Jwt: Cannot invoke \"String.indexOf(String)\" because \"s\" is null",
"error_uri": "https://openid.net/specs/openid-connect-backchannel-1_0.html#Validation"
}