Skip to content

Commit

Permalink
Merge pull request #185 from jmm/verify-func-docs
Browse files Browse the repository at this point in the history
Fix error in verifyFunc docs: verified => unverified
  • Loading branch information
nelsonic authored Aug 8, 2016
2 parents d570a28 + 991b6ff commit d5cb460
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,12 +399,11 @@ The [*internals*](https://github.com/dwyl/hapi-auth-jwt2/blob/eb9fff9fc384fde07e
of `hapi-auth-jwt2` use the `jsonwebtoken.verify` method to ***verify*** if the
JTW was signed using the `JWT_SECRET` (*secret key*).

If you prefer specify your own verification steps instead of having a `validateFunc` simply define a `verifyFunc` ***instead***
while you are initializing the plugin.
If you prefer specifying your own verification logic instead of having a `validateFunc`, simply define a `verifyFunc` instead when initializing the plugin.

- `verifyFunc` - (***optional***) the function which is run once the Token has been decoded
(*instead of a `validateFunc`*) with signature `function(decoded, request, callback)` where:
- `decoded` - (***required***) is the ***decoded*** and ***verified*** JWT received from the client in **request.headers.authorization**
- `decoded` - (***required***) is the decoded but ***unverified*** JWT received from the client in `request.headers.authorization`.
- `request` - (***required***) is the original ***request*** received from the client
- `callback` - (***required***) a callback function with the signature `function(err, isValid, credentials)` where:
- `err` - an internal error.
Expand Down

0 comments on commit d5cb460

Please sign in to comment.