Customization of OIDC error response in RH-SSO
Issue
- How can I possibly customize an OIDC error response from Keycloak/RH-SSO ?
-
Our client applications generally expect a specific error format depending on the context (eg. PSD2 API). We would like to customize the error depending on the RH-SSO usage and client application expectations. For example, in the context of PSD2 API (and in particular following STET specifications), this error should be formatted as:
{ "timestamp": "2019-04-08T16:06:06499+0000", "status": 400, "error": "Bad Request", "message": "Maximum allowed refresh token reuse exceeded", "path": "/v1/token" }
instead of:
HTTP/1.1 400 Bad Request { "error": "invalid_grant", "error_description": "Maximum allowed refresh token reuse exceeded" }
Is this PSD2-context error response formatting something possible in Keycloak ?
Environment
- Red Hat Single Sign-On (RH-SSO)
- 7.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.