-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.go
27 lines (22 loc) · 1.27 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
package jwt
import "errors"
const (
ValidationErrorMalformed = "token is malformed"
ValidationErrorHeadersMalformed = "token headers are malformed"
ValidationErrorClaimsMalformed = "token claims are malformed"
ValidationErrorUnverifiable = "the token could not be verified due to problems with the generation of the test sample"
ValidationErrorSignatureInvalid = "signature validation failed"
ValidationErrorHeadersContentType = "header 'cty' validation failed"
ValidationErrorHeadersKeyId = "header 'kid' validation failed"
ValidationErrorHeadersCritical = "header 'crit' validation failed"
ValidationErrorClaimsIssuer = "claim 'iss' validation failed"
ValidationErrorClaimsSubject = "claim 'sub' validation failed"
ValidationErrorClaimsAudience = "claim 'aud' validation failed"
ValidationErrorClaimsExpired = "claim 'exp' validation failed"
ValidationErrorClaimsNotValidYet = "claim 'nbf' validation failed"
ValidationErrorClaimsIssuedAt = "claim 'iat' validation failed"
ValidationErrorClaimsJwtId = "claim 'jti' validation failed"
ValidationErrorClaimsSessionId = "claim 'sessionId' validation failed"
ValidationErrorClaimsData = "claim 'data' validation failed"
)
var errTokenIsInvalid = errors.New("token is invalid")