mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-09 11:19:50 +08:00
优化代码,为后续手动管理锁定状态做准备
This commit is contained in:
@@ -110,7 +110,7 @@ func DeleteCookie(w http.ResponseWriter, name string) {
|
||||
http.SetCookie(w, cookie)
|
||||
}
|
||||
func CreateSession(w http.ResponseWriter, r *http.Request, authSession *AuthSession) {
|
||||
lockManager.loginStatus.Store(loginStatusKey, true) // 更新登录成功状态
|
||||
lockManager.LoginStatus.Store(loginStatusKey, true) // 更新登录成功状态
|
||||
|
||||
cr := authSession.ClientRequest
|
||||
ua := authSession.UserActLog
|
||||
@@ -202,7 +202,7 @@ func LinkAuth_otp(w http.ResponseWriter, r *http.Request) {
|
||||
http.Error(w, "TooManyError, please login again", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
lockManager.loginStatus.Store(loginStatusKey, false) // 记录登录失败状态
|
||||
lockManager.LoginStatus.Store(loginStatusKey, false) // 记录登录失败状态
|
||||
|
||||
base.Warn("OTP 动态码错误", username, r.RemoteAddr)
|
||||
ua.Info = "OTP 动态码错误"
|
||||
|
Reference in New Issue
Block a user