Create AccessToken inside custom SPI

Hi,
+1

I need to perform some setup tasks in another app since registration should be done in keycloak from now on.

I tried using the client credentials grant routine from org.keycloak.protocol.oidc.endpoints.TokenEndpoint in my EventListenerProvider implementation but end up duplicating a lot of code and ultimately get a java.lang.NoClassDefFoundError: org/keycloak/services/managers/AuthenticationSessionManager
The keycloak services artifact is included with scope provided in my module.
Also I do not want the service account login to be linked to the user session in any way, which I am not sure of with this method.

Best regards