Search code examples
javasingle-sign-onopenid-connectkeycloakkeycloak-services

Keycloak modify existing action token spi


Need to modify existing action token handlers for Verify-email / reset-password action token handlers. I tied extending AbstractActionTokenHander for verify email and registered in org.keycloak.authentication.actiontoken.ActionTokenHandlerFactory. Class loaded when launching keycloak, but still its using already existing class instead of implemented one.


Solution

  • For reset password flow create new authenticator and modify authentication flow.

    1) Create new Authenticator by implementing Authenticator, AuthenticatorFactory or modify existing code in org.keycloak.authentication.authenticators.resetcred.ResetCredentialEmail

    2) Define Authenticator class info in org.keycloak.authentication.AuthenticatorFactory file.

    3) Deploy jar and Copy Reset credential authenticator flow and replace new authenticator with Send reset email execution