-
Notifications
You must be signed in to change notification settings - Fork 46
/
errors.go
37 lines (26 loc) · 1.38 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
package jwt
import "errors"
// JWT sign, verify, build and parse errors.
var (
// ErrNilKey indicates that key is nil.
ErrNilKey = errors.New("key is nil")
// ErrInvalidKey indicates that key is not valid.
ErrInvalidKey = errors.New("key is not valid")
// ErrUnsupportedAlg indicates that given algorithm is not supported.
ErrUnsupportedAlg = errors.New("algorithm is not supported")
// ErrNotJWTType indicates that JWT token type is not JWT.
// Deprecated: leftover after a wrong feature, present due to backward compatibility.
ErrNotJWTType = errors.New("token of not JWT type")
// ErrInvalidFormat indicates that token format is not valid.
ErrInvalidFormat = errors.New("token format is not valid")
// ErrAudienceInvalidFormat indicates that audience format is not valid.
ErrAudienceInvalidFormat = errors.New("audience format is not valid")
// ErrDateInvalidFormat indicates that date format is not valid.
ErrDateInvalidFormat = errors.New("date is not valid")
// ErrAlgorithmMismatch indicates that token is signed by another algorithm.
ErrAlgorithmMismatch = errors.New("token is signed by another algorithm")
// ErrInvalidSignature indicates that signature is not valid.
ErrInvalidSignature = errors.New("signature is not valid")
// ErrUninitializedToken indicates that token was not create with Parse func.
ErrUninitializedToken = errors.New("token was not initialized")
)