Documentation
¶
Index ¶
- func Encode(key interface{}, method jwt.SigningMethod, claims jwt.Claims, ...) (string, error)
- type Header
- type JWTDecode
- type MapClaims
- func (m MapClaims) StandardClaims() jwt.StandardClaims
- func (m MapClaims) Valid() error
- func (m MapClaims) VerifyAudience(cmp string, req bool) bool
- func (m MapClaims) VerifyExpiresAt(cmp int64, req bool) bool
- func (m MapClaims) VerifyIssuedAt(cmp int64, req bool) bool
- func (m MapClaims) VerifyIssuer(cmp string, req bool) bool
- func (m MapClaims) VerifyNotBefore(cmp int64, req bool) bool
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MapClaims ¶
func (MapClaims) StandardClaims ¶
func (m MapClaims) StandardClaims() jwt.StandardClaims
func (MapClaims) Valid ¶
Valid Validates time based claims "exp, iat, nbf". There is no accounting for clock skew. As well, if any of the above claims are not in the token, it will still be considered a valid claim.
func (MapClaims) VerifyAudience ¶
VerifyAudience Compares the aud claim against cmp. If required is false, this method will return true if the value matches or is unset
func (MapClaims) VerifyExpiresAt ¶
VerifyExpiresAt Compares the exp claim against cmp. If required is false, this method will return true if the value matches or is unset
func (MapClaims) VerifyIssuedAt ¶
VerifyIssuedAt Compares the iat claim against cmp. If required is false, this method will return true if the value matches or is unset
func (MapClaims) VerifyIssuer ¶
VerifyIssuer Compares the iss claim against cmp. If required is false, this method will return true if the value matches or is unset
type ValidationError ¶
type ValidationError struct { Inner error // stores the error returned by external dependencies, i.e.: KeyFunc Errors uint32 // bitfield. see ValidationError... constants // contains filtered or unexported fields }
ValidationError The error from Parse if token is not valid
func (ValidationError) Error ¶
func (e ValidationError) Error() string
Validation error is an error type