diff --git a/README.md b/README.md index 1612a3e..5c9dc48 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,10 @@ Argument | Type | Satus | Default | Description ----------- | -------- | -------- | ------- | ----------- `token` | `string` | required | - | The token string generated by `jwt.sign()`. `secret` | `string` | required | - | The string which was used to sign the payload. -`algorithm` | `object`, `string` | optional | `{ algorithm: 'HS256', throwError: false }` | The options object supporting `algorithm` or just the algorithm string. (See [Available Algorithms](#available-algorithms)) +`options` | `object`, `string` | optional | `{ algorithm: 'HS256', throwError: false }` | The options object supporting `algorithm` or just the algorithm string. (See [Available Algorithms](#available-algorithms)) + +#### `throws` +If `options.throwError` is `true` and the token is invalid, an error will be thrown. #### `return` Returns `true` if signature, `nbf` (if set) and `exp` (if set) are valid, otherwise returns `false`.