Skip to content

OidcBackChannelLogoutWebFilter error response is not a correct JSON #16072

Closed
@katya-tis

Description

@katya-tis

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"
}

Metadata

Metadata

Assignees

Labels

in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: bugA general bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions