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

Hierarchy

Methods

  • 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 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 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 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 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 compares the nbf claim against cmp (cmp >= nbf). If req is false, it will return true, if nbf is unset.

    Parameters

    • cmp: number
    • req: boolean

    Returns boolean

Generated using TypeDoc