📜  令牌验证 nodejs - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:47.458000             🧑  作者: Mango

代码示例2
If the request contains the access token, then the server will verify whether it was issued by the server itself using the stored secret. In case the token is expired or recognized as a one not signed by the server, the jsonwebtoken’s verify method will throw an error. We can handle the error to return a 401 error back to the client.