Skip to content

Commit

Permalink
Document availability of request.auth.token in verifyFunc() closes #184
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Aug 22, 2016
1 parent 3a1fe06 commit dc888bf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,14 @@ signature `function(decoded, callback)` where:
- `tokenType` - (***optional*** *defaults to none*) - allow custom token type, e.g. `Authorization: <tokenType> 12345678`.
- `complete` - (***optional*** *defaults to* `false`) - set to `true` to receive the complete token (`decoded.header`, `decoded.payload` and `decoded.signature`) as `decoded` argument to key lookup and `verifyFunc` callbacks (*not `validateFunc`*)

### Useful Features

+ The *encoded* JWT (token) is extracted from the headers of the request and
made available on the `request` object as `request.auth.token`,
in case you need it later on in the request lifecycle.
This feature was requested by @mcortesi in
[hapi-auth-jwt2/issues/123](https://github.com/dwyl/hapi-auth-jwt2/issues/123)


### Understanding the Request Flow

Expand Down

0 comments on commit dc888bf

Please sign in to comment.