Getting a token in an EventListenerProvider

71 views
Skip to first unread message

SoftwareEngineering Hauschel

unread,
Feb 17, 2021, 2:56:34 AM2/17/21
to keyclo...@googlegroups.com
Hi there, i implement a EventListenerProvider that should call a webService, if a new user is registered.

How can i get the accesstoken of my admin user in the EventListenerProvider ? That i've to add to the webService request.

Thanks Fredy

Garth

unread,
Feb 17, 2021, 3:06:12 AM2/17/21
to keyclo...@googlegroups.com
You can make a service account associated with the Client for the service you are calling. Then, you can get the access token of the Client using client-credential grant-type request.

I found a decent tutorial on service accounts if you need more details: https://medium.com/@mihirrajdixit/getting-started-with-service-accounts-in-keycloak-c8f6798a0675
> --
> You received this message because you are subscribed to the Google
> Groups "Keycloak User" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to keycloak-use...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/keycloak-user/CABPyhy-yjVdcsddMtRbOb6YCLenwcz5YJ4dXqicZUxh50BwOcA%40mail.gmail.com <https://groups.google.com/d/msgid/keycloak-user/CABPyhy-yjVdcsddMtRbOb6YCLenwcz5YJ4dXqicZUxh50BwOcA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages