소스 검색

Updated the UserInfoBean with the new OTP record as it gets changed.

Without this change, the user would have to log out and log back in again if he wanted to check a valid code.
James Albright 9 년 전
부모
커밋
29b563e404
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/main/java/password/pwm/http/servlet/SetupOtpServlet.java

+ 3 - 0
src/main/java/password/pwm/http/servlet/SetupOtpServlet.java

@@ -210,6 +210,9 @@ public class SetupOtpServlet extends AbstractPwmServlet {
                 );
                 otpBean.setWritten(true);
 
+                // Update the current user info bean, so the user can check the code right away
+                pwmSession.getUserInfoBean().setOtpUserRecord(otpBean.getOtpUserRecord());
+
                 // mark the event log
                 final UserAuditRecord auditRecord = new AuditRecordFactory(pwmRequest).createUserAuditRecord(
                         AuditEvent.SET_OTP_SECRET,