session management for remote access client (#2592)

* feat(NET-584): wip: session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): only enable if client is disabled

* feat(NET-584): check only for normal users

* feat(NET-584): fix condition
This commit is contained in:
Aceix
2023-10-02 04:57:58 +00:00
committed by GitHub
parent 622eb9899b
commit bfc61fa359
13 changed files with 238 additions and 70 deletions

View File

@@ -141,6 +141,11 @@ func VerifyAuthRequest(authRequest models.UserAuthParams) (string, error) {
// Create a new JWT for the node
tokenString, _ := CreateUserJWT(authRequest.UserName, result.IsSuperAdmin, result.IsAdmin)
// update last login time
result.LastLoginTime = time.Now()
UpsertUser(result)
return tokenString, nil
}