Customization of the 401 error message in the Keycloak authentication call response #18
Closed
moisesnoah
started this conversation in
General
Replies: 1 comment
-
I don't answer common questions here. Go e.g. to https://keycloak.discourse.group/ to ask your questions to the community! Thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Danilo, good afternoon. How are you? My name is Noah, and I apologize for the inconvenience. But if you could answer a question for me regarding the handling and customization of exceptions in Keycloak - specifically customizing the message for error 401.
Like, when the isValid method gets a return false, I need to get the information about de authentication status response error and inform(or throw) in the response of the HTTP request. For exemple, I want to change the erro_description, as you can see in the postman print bellow :
To something like this:
{
error: invalid_grant,
error_description: "information that came from the other api that authenticate and confirm the isValid"
}
I'm using the 18.0.0. version of Keycloak-SPI, Spring Boot 3 and Java 17.
Thank you so much for your time!
Have a great day!
Mostrar menos
Beta Was this translation helpful? Give feedback.
All reactions