【问题标题】:WSO2 - Password recovery without using captchas, emails or challenge questionsWSO2 - 无需使用验证码、电子邮件或挑战问题即可恢复密码
【发布时间】:2016-08-02 04:12:11
【问题描述】:

我正在尝试从使用 Soap 与 WS02 身份服务器通信的应用中恢复用户密码。

我的目的是向 WS02 索要恢复密码的确认码,自己通过电子邮件将其发送给用户,当我收到确认码时,将其与新密码一起发布到 WSO2 api。

我正在使用以下设置:

Notification.Sending.Enable=false
Notification.Expire.Time=0
Notification.Sending.Internally.Managed=false
UserAccount.Recovery.Enable=true
Captcha.Verification.Internally.Managed=false

我尝试按照here 中提到的恢复过程进行操作,但错误不断发生:

  1. getCaptcha() - 被忽略,因为我不假装验证码
  2. verifyUser() - 成功返回密钥。
  3. sendRecoveryNotification() - 从步骤 2 中给定密钥时失败:18001 用户的确认码无效。
  4. getCaptcha() - 被忽略,因为我不假装验证码
  5. verifyConfirmationCode() - 使用第 2 步中的密钥:18001 用户的确认码无效。
  6. updatePassword() - 使用第 2 步中的密钥:18013 更新用户凭据时出错。

是否可以在不使用验证码或电子邮件的情况下恢复密码?

【问题讨论】:

    标签: wso2 wso2is wso2carbon


    【解决方案1】:

    Notification.Expire.Time 设置为更高的值(例如,60)。这是密钥有效的时间(以分钟为单位)。就您而言,当您致电 sendRecoveryNotification() 时,密钥应该已过期。

    同样在第 6 步中,当调用 updatePassword() 时,它应该是第 5 步中的密钥(当您修复上述问题时,您会得到一个),而不是第 2 步中的那个。

    【讨论】:

    • 确实,问题出在到期时间上。谢谢你:)
    猜你喜欢
    • 1970-01-01
    • 2010-11-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-30
    • 2016-09-19
    • 1970-01-01
    • 2011-10-07
    相关资源
    最近更新 更多