【问题标题】:how change encoding after password migration to hybris密码迁移到 hybris 后如何更改编码
【发布时间】:2017-09-22 21:55:27
【问题描述】:

我正在迁移使用 sha1 编码的客户密码。我编写了一个自定义编码器,我可以成功迁移。迁移后,我希望当客户更改密码时,也将编码更改为 hybris 默认编码,但仍使用自定义编码器。我该如何处理?

【问题讨论】:

    标签: encoding passwords hybris


    【解决方案1】:

    您可以扩展 DefaultCustomerAccountService changePassword 方法来设置新的编码。 UserModel 已经有 PasswordEncoding 属性。当 changePassword 方法被某处调用时,检查 usermodel 编码并使用新编码调用 setPassword 方法。该方法已经为 usermodel 设置了新的编码。

    如果您打算使用自定义编码,您可以使用 PasswordEncoder 接口开发自己的编码。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-10-10
      • 1970-01-01
      • 2012-07-21
      • 2011-09-22
      • 2012-06-02
      • 2012-10-31
      • 2013-02-17
      • 1970-01-01
      相关资源
      最近更新 更多