aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/golang-jwt/jwt/v5/errors.go
diff options
context:
space:
mode:
authorLibravatar Rutger Broekhoff2024-01-02 18:56:31 +0100
committerLibravatar Rutger Broekhoff2024-01-02 18:56:31 +0100
commit8db41da676ac8368ef7c2549d56239a5ff5eedde (patch)
tree09c427fd66de2ec1ebffc8342f5fdbb84b0701b5 /vendor/github.com/golang-jwt/jwt/v5/errors.go
parentd4f75fb6db22e57577867445a022227e70958931 (diff)
downloadgitolfs3-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.go49
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 @@
1package jwt
2
3import (
4 "errors"
5 "strings"
6)
7
8var (
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.
30type joinedError struct {
31 errs []error
32}
33
34func (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.
45func joinErrors(errs ...error) error {
46 return &joinedError{
47 errs: errs,
48 }
49}