Closed chris-rl closed 4 years ago
I solved it. I introduced a new (derived) authenticator which can be used for direct-grant-flows. You can find a PR for this change here https://github.com/thomasdarimont/keycloak-extension-playground/pull/11
Greetings.
Fixed with merging #11
Hello, I'm trying to use your 'auth require role'-extension to add the require-role check to a direct-grant-flow. When the user owns the required role, the flow returns the correct token.
But if the user doesn't own the required role, I'm getting a 500 from the token endpoint. I would like to get a 401.
As far as I understand, the extension is meant to be used for browser-flows. Can this be updated for usage with direct grant flow?
What would I need to put in the authenticate()-Method for the case the role ist missing?
Kind Regards, Christian