jsonwebtoken#VerifyOptions TypeScript Examples
The following examples show how to use
jsonwebtoken#VerifyOptions.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: jwt.ts From ts-oauth2-server with MIT License | 6 votes |
/**
* Asynchronously verify given token using a secret or a public key to get a decoded token
*/
verify(token: string, options: VerifyOptions = {}): Promise<Record<string, unknown>> {
return new Promise((resolve, reject) => {
jwt.verify(token, this.secretOrPrivateKey, options, (err, decoded: any) => {
if (decoded) resolve(decoded);
else reject(err);
});
});
}
Example #2
Source File: Token.ts From fosscord-server with GNU Affero General Public License v3.0 | 5 votes |
JWTOptions: VerifyOptions = { algorithms: ["HS256"] }
Example #3
Source File: user.ts From api-example with MIT License | 5 votes |
verifyOptions: VerifyOptions = {
algorithms: ['RS256']
}