How could we: "Ćustomize Error Message When Obtaining Token in OAuth2.0 Authorization Server"
Good afternoon! 👋 We would be very grateful if you are kind enough to read and respond to our request 😊.
We need given an Authentication request issued towards our OAuth 2.0 authorization server; that in case of error, the responded message is customized.
Currently if we point from POSTMAN to:
https://[IP]:[Port]/oauth2/token?grant_type=client_credentials&scope=my/scope
Username: Erroneous
Password: Erroneous
We get:
{
"error": "server_error",
"error_description": "ERROR #5002: Cache error: <INVALID OREF>zAuthorize+28^OAuth2.Server.Token.1"
}
We would need something like:
{
"codigo": "Error code 001",
"descripcion": "No se ha podido obtener el Token"
}
Please could you tell us by which steps, which documentation and which Ensemble classes to customize this error message?
Thank you very much in advance.
So far we have dug into:
Documentation:
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl…
Ensemble Web Production page:
System > Security Management > OAuth 2.0 Authorization Server Settings - (Security Settings).
Under the Customization tab.
Ensemble Classes:
%OAuth2.Server.Authenticate
%OAuth2.Server.Validate
%OAuth2.Server.JWT
%OAuth2.Server.Properties
Please could you explain us which steps to follow, in which classes to investigate and which documentation to read to do it? 🤔 Thank you in advance for your time! 🤗
Comments
Hola, buenas tardes, espero que estes muy bien.
Has obtenido respuesta e esta consulta? Lo has podido resolver de alguna manera? Yo estoy ahora con esto mismo y no logro aun resolverlo.
Si tienes alguna ayuda, te agradeceria mucho.
Translation:
Hello, good afternoon, I hope you are well.
Have you received an answer to this query? Have you been able to resolve it in any way? I'm dealing with this same thing now and I still can't figure it out.
If you have any help, I would greatly appreciate it.