Sessions: Remove invalid session cookie if it's invalid/expired/missing (#59556)
only remove invalid session cookie if it's invalid/expired/missing
This commit is contained in:
@@ -1,12 +1,23 @@
|
||||
package usertoken
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
var ErrInvalidSessionToken = errors.New("invalid session token")
|
||||
|
||||
type TokenRevokedError struct {
|
||||
UserID int64
|
||||
TokenID int64
|
||||
MaxConcurrentSessions int64
|
||||
}
|
||||
|
||||
func (e *TokenRevokedError) Error() string { return "user token revoked" }
|
||||
func (e *TokenRevokedError) Error() string {
|
||||
return fmt.Sprintf("%s: user token revoked", ErrInvalidSessionToken)
|
||||
}
|
||||
|
||||
func (e *TokenRevokedError) Unwrap() error { return ErrInvalidSessionToken }
|
||||
|
||||
// UserToken represents a user token
|
||||
type UserToken struct {
|
||||
|
||||
Reference in New Issue
Block a user