We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b357385 commit 1c4047fCopy full SHA for 1c4047f
example_test.go
@@ -164,6 +164,9 @@ func ExampleParse_errorChecking() {
164
fmt.Println("You look nice today")
165
} else if errors.Is(err, jwt.ErrTokenMalformed) {
166
fmt.Println("That's not even a token")
167
+ } else if errors.Is(err, jwt.ErrTokenSignatureInvalid) {
168
+ // Invalid signature
169
+ fmt.Println("Invalid signature")
170
} else if errors.Is(err, jwt.ErrTokenExpired) || errors.Is(err, jwt.ErrTokenNotValidYet) {
171
// Token is either expired or not active yet
172
fmt.Println("Timing is everything")
0 commit comments