[keycloak-user] Change 403 Message

Florian Fußeder fussederflorian at gmail.com
Mon Oct 7 10:12:28 EDT 2019


Hello,

is there a way to change the message displayed on the 403 json response?
If i try to to access a resource that i don't have the permissions for, i
get the following json response:
{
"timestamp": "2019-10-07T13:31:47.274+0000",
"status": 403,
"error": "Forbidden",
"message": "Access to the requested resource has been denied",
"path": "/api/"
}

but what i want is:

{
"timestamp": "2019-10-07T13:31:47.274+0000",
"status": 403,
"error": "Forbidden",
"message": "To access these resources mail to ....",
"path": "/v1/"
}

I know i could do a redirect via policy-enforcer, but i have to avoid a
redirect.

Greetings,
Florian


More information about the keycloak-user mailing list