Is there possible ti access authenticated user inside RealmResourceProvider … for example I am writing a custom rest api extension and I tried with:
private final AuthenticationManager.AuthResult auth;
public ExampleRestResource(KeycloakSession session) {
this.session = session;
this.auth = new AppAuthManager.BearerTokenAuthenticator(session).authenticate();
}
but I receive class not found error
Uncaught server error: java.lang.NoClassDefFoundError: org/keycloak/services/managers/AppAuthManager$BearerTokenAuthenticator
I have deployed the SPI as jar to standalone folder … doo I need to include jboss-deployment-structure.xml ?