-
Notifications
You must be signed in to change notification settings - Fork 22
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
Feature Request: allow authenticating with a service account (client-id/-secret) #137
Comments
Hey, yes surely possible, but not without taking on some effort and probably some necessary refactoring. I started doing exactly that a while back, but as there was no demand so far, I didn't follow up on it. I might continue or start over again, but feel free to provide a PR if you like 😄 |
It would be handy to authenticate with clientId/secret instead of the credentials. I will try to create a PR to handle that. |
Hi, I found this library and would like to use it, but I also need support for client-id/client-secret authentication (client credentials flow). I'm willing to work on a PR but would appreciate feedback on the best approach. Proposed ChangesMy first idea is to change the Keycloak constructor signature from
to
and pass the The interface could look like:
And the
This would allow adding
Alternative ApproachSince modifying the constructor is a big breaking change, I also considered a compromise by adding the AuthMethodInterface as extra argument after the already existing arguments.
The
When using client credentials, the username and password parameters would accept the client ID and client secret. Request for Feedback
Looking forward to your thoughts! Thanks! |
Would it be possible to add the option to authenticate with the server via a client-id/-secret instead of admin-credentials?
official docs:
https://www.keycloak.org/docs/latest/server_development/index.html#authenticating-with-a-service-account
The text was updated successfully, but these errors were encountered: