Skip to content

Commit fa18e84

Browse files
committed
Merge pull request oauthjs#89 from bra1n/patch-1
Update Readme "extendedGrant" function signature
2 parents 6291159 + 2156abc commit fa18e84

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Readme.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,9 @@ The spec does not actually require that you revoke the old token - hence this is
215215

216216
### Required for [extension grant](#extension-grants) grant type
217217

218-
#### extendedGrant (req, callback)
218+
#### extendedGrant (grantType, req, callback)
219+
- *string* **grantType**
220+
- The (custom) grant type
219221
- *object* **req**
220222
- The raw request
221223
- *function* **callback (error, supported, user)**
@@ -247,7 +249,7 @@ The spec does not actually require that you revoke the old token - hence this is
247249
## Extension Grants
248250
You can support extension/custom grants by implementing the extendedGrant method as outlined above.
249251
Any requests that begin with http(s):// (as [defined in the spec](http://tools.ietf.org/html/rfc6749#section-4.5)) will be passed to it for you to handle.
250-
You can access the grant type via req.oauth.grantType and you should pass back supported as `false` if you do not support it to ensure a consistent (and compliant) response.
252+
You can access the grant type via the first argument and you should pass back supported as `false` if you do not support it to ensure a consistent (and compliant) response.
251253

252254
## Example using the `password` grant type
253255

0 commit comments

Comments
 (0)