-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patherrors.go
56 lines (38 loc) · 2.21 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package gwt
import "errors"
var (
// ErrFailedToCreateAccessToken indicates access Token failed to create, reason unknown
ErrFailedToCreateAccessToken = errors.New("failed to create access Token")
// ErrFailedToCreateRefreshToken indicates refresh Token failed to create, reason unknown
ErrFailedToCreateRefreshToken = errors.New("failed to create refresh Token")
// ErrEmptyAccessSecretKey indicates access secret key is empty
ErrEmptyAccessSecretKey = errors.New("empty access token secret key")
// ErrEmptyGetUserFunc indicates get user func is empty
ErrEmptyGetUserFunc = errors.New("empty get user by id func")
// ErrEmptyAuthenticator indicates authentication function is empty
ErrEmptyAuthenticator = errors.New("empty authentication function")
// ErrEmptyStorage indicates storage is not provided
ErrEmptyStorage = errors.New("empty storage")
// ErrCannotSaveToken indicates token is failed to save, reason unknown
ErrCannotSaveToken = errors.New("failed to save token from storage")
// ErrCannotDeleteToken indicates token is failed to delete, reason unknown
ErrCannotDeleteToken = errors.New("failed to delete token from storage")
// ErrUnknownSigningMethod indicates unknown signing method provided
ErrUnknownSigningMethod = errors.New("unknown signing method provided")
// ErrInvalidSigningMethod indicates signing method id invalid
ErrInvalidSigningMethod = errors.New("invalid signing method")
// ErrTokenExpired indicates token has expired
ErrTokenExpired = errors.New("token has expired")
// ErrTokenInvalid indicates token is not valid
ErrTokenInvalid = errors.New("token is not valid")
// ErrRefreshTokenIsNotProvided indicates refresh token is not provided
ErrRefreshTokenIsNotProvided = errors.New("refresh token is not provided")
// ErrNoAuthHeader indicates no auth header is provided
ErrNoAuthHeader = errors.New("no auth header provided")
// ErrInvalidAuthHeader indicates auth header is not valid
ErrInvalidAuthHeader = errors.New("invalid auth header")
// ErrUserIdIsNotProvided indicates user id is not provided
ErrUserIdIsNotProvided = errors.New("user id is not provided")
// ErrNotAuthUser indicates user is not authenticated
ErrNotAuthUser = errors.New("user is not authenticated")
)