mirror of
https://github.com/hanzoai/node-jsonwebtoken.git
synced 2026-09-24 17:00:48 +00:00
Document NotBeforeError (#529)
This commit is contained in:
committed by
Eduardo Diaz
parent
5ecfc5402e
commit
7cc9e94671
@@ -298,6 +298,30 @@ jwt.verify(token, 'shhhhh', function(err, decoded) {
|
||||
});
|
||||
```
|
||||
|
||||
### NotBeforeError
|
||||
Thrown if current time is before the nbf claim.
|
||||
|
||||
Error object:
|
||||
|
||||
* name: 'NotBeforeError'
|
||||
* message: 'jwt not active'
|
||||
* date: 2018-10-04T16:10:44.000Z
|
||||
|
||||
```js
|
||||
jwt.verify(token, 'shhhhh', function(err, decoded) {
|
||||
if (err) {
|
||||
/*
|
||||
err = {
|
||||
name: 'NotBeforeError',
|
||||
message: 'jwt not active',
|
||||
date: 2018-10-04T16:10:44.000Z
|
||||
}
|
||||
*/
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## Algorithms supported
|
||||
|
||||
Array of supported algorithms. The following algorithms are currently supported.
|
||||
|
||||
Reference in New Issue
Block a user