docs(example): add auth time (#700)

This commit is contained in:
mqf20 2025-02-13 19:23:44 +08:00 committed by GitHub
parent c3c1bd3a40
commit 03e5ff8345
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -151,6 +151,9 @@ func (s *Storage) CheckUsernamePassword(username, password, id string) error {
// in this example we'll simply check the username / password and set a boolean to true
// therefore we will also just check this boolean if the request / login has been finished
request.done = true
request.authTime = time.Now()
return nil
}
return fmt.Errorf("username or password wrong")