简体   繁体   English

Keycloak修改现有操作令牌SPI

[英]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 . 我将扩展AbstractActionTokenHander绑定为验证电子邮件,并在org.keycloak.authentication.actiontoken.ActionTokenHandlerFactory注册。 Class loaded when launching keycloak, but still its using already existing class instead of implemented one. 启动keycloak时加载了类,但仍使用现有类代替已实现的类。

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 1)通过实现Authenticator, AuthenticatorFactory创建新的Authenticator或修改org.keycloak.authentication.authenticators.resetcred.ResetCredentialEmail现有代码

2) Define Authenticator class info in org.keycloak.authentication.AuthenticatorFactory file. 2)在org.keycloak.authentication.AuthenticatorFactory文件中定义Authenticator类信息。

3) Deploy jar and Copy Reset credential authenticator flow and replace new authenticator with Send reset email execution 3)部署jar和复制重置凭证身份验证器流程,并用发送重置电子邮件执行替换新的身份验证器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM