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.
Returns void
verifyAudience
verifyAudience(cmp, req): boolean
VerifyAudience Compares the aud claim against cmp.
If required is false, this method will return true if the value matches or is unset
Parameters
cmp: string
req: boolean
Returns boolean
verifyExpiresAt
verifyExpiresAt(cmp, req): boolean
VerifyExpiresAt compares the exp claim against cmp (cmp <= exp).
If req is false, it will return true, if exp is unset.
Parameters
cmp: number
req: boolean
Returns boolean
verifyIssuedAt
verifyIssuedAt(cmp, req): boolean
VerifyIssuedAt compares the exp claim against cmp (cmp >= iat).
If req is false, it will return true, if iat is unset.
Parameters
cmp: number
req: boolean
Returns boolean
verifyIssuer
verifyIssuer(cmp, req): boolean
VerifyIssuer compares the iss claim against cmp.
If required is false, this method will return true if the value matches or is unset
Parameters
cmp: string
req: boolean
Returns boolean
verifyNotBefore
verifyNotBefore(cmp, req): boolean
VerifyNotBefore compares the nbf claim against cmp (cmp >= nbf).
If req is false, it will return true, if nbf is unset.
MapClaims is a claims type that uses the map[string]interface{} for JSON decoding. This is the default claims type if you don't supply one