feat: new ValidateToken method for AuthService, based on code from the monolithic implementation of auth middleware;
feat: add detailed authentication error types;
This commit is contained in:
@@ -29,4 +29,10 @@ var (
|
||||
ErrInvalidCredentials = errors.New("Invalid username, password or TOTP code")
|
||||
ErrInvalidToken = errors.New("Token is invalid or expired")
|
||||
ErrServerError = errors.New("Internal server error")
|
||||
|
||||
ErrTokenExpired = errors.New("Token is expired")
|
||||
ErrTokenInvalid = errors.New("Token is invalid")
|
||||
ErrWrongTokenType = errors.New("Invalid token type")
|
||||
ErrSessionNotFound = errors.New("Could not find session in database")
|
||||
ErrSessionTerminated = errors.New("Session is terminated")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user