Skip to content

Commit 708c4d8

Browse files
committed
Merge pull request auth0#9 from tracid/master
Document decode function.
2 parents 44ed992 + f88373a commit 708c4d8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,19 @@ jwt.verify(token, cert, { audience: 'urn:foo', issuer: 'urn:issuer' }, function(
9393

9494
```
9595

96+
### jwt.decode(token)
97+
98+
(Synchronous) Returns the decoded payload without verifying if the signature is valid.
99+
100+
`token` is the JsonWebToken string
101+
102+
Example
103+
104+
```js
105+
// get the decoded payload ignoring signature, no secretOrPrivateKey needed
106+
var decoded = jwt.decode(token);
107+
```
108+
96109
## Algorithms supported
97110

98111
Array of supported algorithms. The following algorithms are currently supported.

0 commit comments

Comments
 (0)