-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for customised messages per client #144
Comments
Hello @cesarbtt, thanks for the feature request.
Can you give me some details on this, please? I would like to better understand which scenarios and requirements you have in mind here. Aren't the requirements prescribed by the authentication flow and configured authenticators therein?
Would you mind sharing this, so I can have a look on what you have in mind? Best regards, |
Although in our context we limit access to clients by groups, the requirements for a user to be part of a group are different. For example if to access a client A you need to have paid a fee the message should be "You cannot access the service because you have not paid the fee". If for a client B the criterion to be assigned to his group is to reside in the city the message should be "You cannot access the service because you do not reside in this locality". This is why we need different messages for each client. |
The modification I have made what it does is to check if there is a custom message for the client of the form {error-code}.{clientid}. If it exists that one is used. Otherwise the message {errorcode} is used. I have been working with keycloak for a short time so I don't know if the implementation I have done is the best solution but for the moment it has solved our need. |
|
Is there an existing feature request for this?
Is your feature related to a problem? Please describe.
No response
Describe the solution you'd like
Each client will check different requirements, so the message to the user should explain the reason why access has been denied.
Describe alternatives you've considered
I have made a modification to the RestrictClientAuthAuthenticator.htmlErrorResponse method to look for whether there are messages of the form . and in that case that message is displayed instead of the configured in the authentication step
Anything else?
No response
The text was updated successfully, but these errors were encountered: