Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrSignatureInvalid = &errors.UnauthorizedError{ Reason: "jwt signature is invalid", } ErrTokenMalformed = &errors.UnauthorizedError{ Reason: "jwt is malformed", } ErrPayloadMalformed = &errors.UnauthorizedError{ Reason: "jwt payload is malformed", } ErrPayloadDecodingFailed = &errors.UnauthorizedError{ Reason: "jwt payload decoding failed", } )
Functions ¶
This section is empty.
Types ¶
type JWT ¶
type JWT = expiringJWT.ExpiringJWT
type JWTHandler ¶
type JWTHandler[T JWT] struct { // contains filtered or unexported fields }
func New ¶
func New[T JWT](options jwtOptions.JWTOptions, newClaims NewClaims[T]) *JWTHandler[T]
func (*JWTHandler[T]) New ¶
func (h *JWTHandler[T]) New() T
func (*JWTHandler[T]) ParseInto ¶
func (h *JWTHandler[T]) ParseInto(t T, blob []byte, now time.Time) error
func (*JWTHandler[T]) SetExpiryAndSign ¶
func (h *JWTHandler[T]) SetExpiryAndSign(claims T) (string, error)
Click to show internal directories.
Click to hide internal directories.