-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add globals to be able to modify error messages and statuses
- Loading branch information
Showing
6 changed files
with
77 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package jwt | ||
|
||
import ( | ||
"net/http" | ||
) | ||
|
||
var ( | ||
ErrAuthorizationHeader = "authorization header malformed" | ||
ErrAuthorizationHeaderStatus = http.StatusUnauthorized | ||
ErrAuthorizationScheme = "authorization scheme not supported" | ||
ErrAuthorizationSchemeStatus = http.StatusUnauthorized | ||
ErrBodyMissingKey = "body is missing refresh token key" | ||
ErrBodyMissingKeyStatus = http.StatusUnprocessableEntity | ||
ErrMethodNotAllowed = "method not allowed" | ||
ErrMethodNotAllowedStatus = http.StatusMethodNotAllowed | ||
ErrRequestMalformed = "request malformed" | ||
ErrRequestMalformedStatus = http.StatusBadRequest | ||
ErrRouteNotFound = "route not found" | ||
ErrRouteNotFoundStatus = http.StatusNotFound | ||
ErrTokenExpired = "token is expired" | ||
ErrTokenExpiredStatus = http.StatusUnauthorized | ||
ErrTokenInvalid = "token is invalid" | ||
ErrTokenInvalidStatus = http.StatusUnauthorized | ||
ErrTokenInvalidIssuedAt = "token has invalid issued at" | ||
ErrTokenInvalidIssuedAtStatus = http.StatusUnauthorized | ||
ErrTokenNotYetValid = "token is not yet valid" | ||
ErrTokenNotYetValidStatus = http.StatusUnauthorized | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters