JwtService
Index
Constructors
constructor
Methods
publicdecode
Returns the decoded payload without verifying if the signature is valid. token - JWT string to decode [options] - Options for decoding returns - The decoded Token
publicdecodeSync
alias decode method
getDecodeOptions
getSignOptions
getVerifyOptions
isSecret
publicsign
Asynchronous sign the given payload into a JSON Web Token string payload - Payload to sign, could be an literal, buffer or string secretOrPrivateKey - Either the secret for HMAC algorithms, or the PEM encoded private key for RSA and ECDSA. [options] - Options for the signature returns - The JSON Web Token string
publicsignSync
Synchronously sign the given payload into a JSON Web Token string payload - Payload to sign, could be an literal, buffer or string secretOrPrivateKey - Either the secret for HMAC algorithms, or the PEM encoded private key for RSA and ECDSA. [options] - Options for the signature returns - The JSON Web Token string
publicverify
Asynchronous verify given token using a secret or a public key to get a decoded token token - JWT string to verify secretOrPublicKey - Either the secret for HMAC algorithms, or the PEM encoded public key for RSA and ECDSA. [options] - Options for the verification returns - The decoded token.
publicverifySync
Synchronously verify given token using a secret or a public key to get a decoded token token - JWT string to verify secretOrPublicKey - Either the secret for HMAC algorithms, or the PEM encoded public key for RSA and ECDSA. [options] - Options for the verification returns - The decoded token.
@seehttps://github.com/auth0/node-jsonwebtoken