Skip to content

Commit a80c7cc

Browse files
lucknerjbthomseddon
authored andcommitted
Updated Readme.md
Updated Readme.md with documentation for the 'getUserFromClient' model function
1 parent 492ac85 commit a80c7cc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Readme.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,21 @@ The spec does not actually require that you revoke the old token - hence this is
231231
- Must contain the following keys:
232232
- *string|number* **id**
233233

234+
### Required for `client_credentials` grant type
235+
236+
#### getUserFromClient (clientId, clientSecret, callback)
237+
- *string* **clientId**
238+
- *string* **clientSecret**
239+
- *function* **callback (error, user)**
240+
- *mixed* **error**
241+
- Truthy to indicate an error
242+
- *object* **user**
243+
- The user retrieved from storage or falsey to indicate an invalid user
244+
- Saved in `req.user`
245+
- Must contain the following keys:
246+
- *string|number* **id**
247+
248+
234249
### Optional
235250

236251
#### generateToken (type, callback)

0 commit comments

Comments
 (0)