diff options
| author | Rutger Broekhoff | 2024-01-02 18:56:31 +0100 |
|---|---|---|
| committer | Rutger Broekhoff | 2024-01-02 18:56:31 +0100 |
| commit | 8db41da676ac8368ef7c2549d56239a5ff5eedde (patch) | |
| tree | 09c427fd66de2ec1ebffc8342f5fdbb84b0701b5 /vendor/github.com/golang-jwt/jwt/v5/errors.go | |
| parent | d4f75fb6db22e57577867445a022227e70958931 (diff) | |
| download | gitolfs3-8db41da676ac8368ef7c2549d56239a5ff5eedde.tar.gz gitolfs3-8db41da676ac8368ef7c2549d56239a5ff5eedde.zip | |
Delete vendor directory
Diffstat (limited to 'vendor/github.com/golang-jwt/jwt/v5/errors.go')
| -rw-r--r-- | vendor/github.com/golang-jwt/jwt/v5/errors.go | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/vendor/github.com/golang-jwt/jwt/v5/errors.go b/vendor/github.com/golang-jwt/jwt/v5/errors.go deleted file mode 100644 index 23bb616..0000000 --- a/vendor/github.com/golang-jwt/jwt/v5/errors.go +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | package jwt | ||
| 2 | |||
| 3 | import ( | ||
| 4 | "errors" | ||
| 5 | "strings" | ||
| 6 | ) | ||
| 7 | |||
| 8 | var ( | ||
| 9 | ErrInvalidKey = errors.New("key is invalid") | ||
| 10 | ErrInvalidKeyType = errors.New("key is of invalid type") | ||
| 11 | ErrHashUnavailable = errors.New("the requested hash function is unavailable") | ||
| 12 | ErrTokenMalformed = errors.New("token is malformed") | ||
| 13 | ErrTokenUnverifiable = errors.New("token is unverifiable") | ||
| 14 | ErrTokenSignatureInvalid = errors.New("token signature is invalid") | ||
| 15 | ErrTokenRequiredClaimMissing = errors.New("token is missing required claim") | ||
| 16 | ErrTokenInvalidAudience = errors.New("token has invalid audience") | ||
| 17 | ErrTokenExpired = errors.New("token is expired") | ||
| 18 | ErrTokenUsedBeforeIssued = errors.New("token used before issued") | ||
| 19 | ErrTokenInvalidIssuer = errors.New("token has invalid issuer") | ||
| 20 | ErrTokenInvalidSubject = errors.New("token has invalid subject") | ||
| 21 | ErrTokenNotValidYet = errors.New("token is not valid yet") | ||
| 22 | ErrTokenInvalidId = errors.New("token has invalid id") | ||
| 23 | ErrTokenInvalidClaims = errors.New("token has invalid claims") | ||
| 24 | ErrInvalidType = errors.New("invalid type for claim") | ||
| 25 | ) | ||
| 26 | |||
| 27 | // joinedError is an error type that works similar to what [errors.Join] | ||
| 28 | // produces, with the exception that it has a nice error string; mainly its | ||
| 29 | // error messages are concatenated using a comma, rather than a newline. | ||
| 30 | type joinedError struct { | ||
| 31 | errs []error | ||
| 32 | } | ||
| 33 | |||
| 34 | func (je joinedError) Error() string { | ||
| 35 | msg := []string{} | ||
| 36 | for _, err := range je.errs { | ||
| 37 | msg = append(msg, err.Error()) | ||
| 38 | } | ||
| 39 | |||
| 40 | return strings.Join(msg, ", ") | ||
| 41 | } | ||
| 42 | |||
| 43 | // joinErrors joins together multiple errors. Useful for scenarios where | ||
| 44 | // multiple errors next to each other occur, e.g., in claims validation. | ||
| 45 | func joinErrors(errs ...error) error { | ||
| 46 | return &joinedError{ | ||
| 47 | errs: errs, | ||
| 48 | } | ||
| 49 | } | ||