@@ -46,12 +46,16 @@ Uses the following values to check:</p>
4646<li >' ; saveRefreshToken' ; ,</li >
4747<li >' ; saveToken' ; ,</li >
4848<li >' ; getAccessToken' ; </li >
49+ <li >' ; revokeToken' ; </li >
4950</ul >
5051</dd >
5152<dt ><a href =" #UserValidation " >UserValidation</a ></dt >
5253<dd ><p >Used to register handlers for different instances that validate users.
5354This allows you to validate user access on a client-based level.</p >
5455</dd >
56+ <dt ><a href =" #validateParams " >validateParams</a > ⇒ <code >boolean</code ></dt >
57+ <dd ><p >Abstraction that checks given query/body params against a given schema</p >
58+ </dd >
5559<dt ><a href =" #app " >app</a > : <code >Object</code ></dt >
5660<dd ><p >Wrapped <code >WebApp</code > with express-style get/post and default use routes.</p >
5761</dd >
@@ -76,6 +80,8 @@ Implements the OAuth2Server model with Meteor-Mongo bindings.
7680 * [ .saveRefreshToken(token, clientId, expires, user)] ( #OAuthMeteorModel+saveRefreshToken ) ⇒ <code >Promise.< ; \* > ; </code >
7781 * [ .getRefreshToken()] ( #OAuthMeteorModel+getRefreshToken )
7882 * [ .grantTypeAllowed(clientId, grantType)] ( #OAuthMeteorModel+grantTypeAllowed ) ⇒ <code >boolean</code >
83+ * [ .verifyScope(accessToken, scope)] ( #OAuthMeteorModel+verifyScope ) ⇒ <code >Promise.< ; boolean> ; </code >
84+ * [ .revokeToken()] ( #OAuthMeteorModel+revokeToken )
7985
8086<a name =" OAuthMeteorModel+log " ></a >
8187
@@ -199,6 +205,24 @@ getRefreshToken(token) should return an object with:
199205| clientId |
200206| grantType |
201207
208+ <a name =" OAuthMeteorModel+verifyScope " ></a >
209+
210+ ### oAuthMeteorModel.verifyScope(accessToken, scope) ⇒ <code >Promise.< ; boolean> ; </code >
211+ Compares expected scope from token with actual scope from request
212+
213+ ** Kind** : instance method of [ <code >OAuthMeteorModel</code >] ( #OAuthMeteorModel )
214+
215+ | Param |
216+ | --- |
217+ | accessToken |
218+ | scope |
219+
220+ <a name =" OAuthMeteorModel+revokeToken " ></a >
221+
222+ ### oAuthMeteorModel.revokeToken()
223+ revokeToken(refreshToken) is required and should return true
224+
225+ ** Kind** : instance method of [ <code >OAuthMeteorModel</code >] ( #OAuthMeteorModel )
202226<a name =" OAuth2ServerDefaults " ></a >
203227
204228## OAuth2ServerDefaults : <code >Object</code >
@@ -250,6 +274,7 @@ Defaults to a 500 response, unless further details were added.
250274| res | | |
251275| options | <code >Object</code > | options with error information |
252276| options.error | <code >String</code > | Error name |
277+ | options.logError | <code >boolean</code > | optional flag to log the erroe to the console |
253278| options.description | <code >String</code > | Error description |
254279| options.uri | <code >String</code > | Optional uri to redirect to when error occurs |
255280| options.status | <code >Number</code > | Optional statuscode, defaults to 500 |
@@ -274,6 +299,7 @@ Uses the following values to check:
274299- 'saveRefreshToken',
275300- 'saveToken',
276301- 'getAccessToken'
302+ - 'revokeToken'
277303
278304** Kind** : global constant
279305** Returns** : <code >boolean</code > - true if valid, otherwise false
@@ -289,6 +315,24 @@ Used to register handlers for different instances that validate users.
289315This allows you to validate user access on a client-based level.
290316
291317** Kind** : global constant
318+
319+ * [ UserValidation] ( #UserValidation )
320+ * [ .register(instance, validationHandler)] ( #UserValidation.register )
321+ * [ .isValid(instance, handlerArgs)] ( #UserValidation.isValid ) ⇒ <code >\* </code >
322+
323+ <a name =" UserValidation.register " ></a >
324+
325+ ### UserValidation.register(instance, validationHandler)
326+ Registers a validation method that allows
327+ to validate users on custom logic.
328+
329+ ** Kind** : static method of [ <code >UserValidation</code >] ( #UserValidation )
330+
331+ | Param | Type | Description |
332+ | --- | --- | --- |
333+ | instance | [ <code >OAuth2Server</code >] ( #OAuth2Server ) | |
334+ | validationHandler | <code >function</code > | sync or async function that performs the validation |
335+
292336<a name =" UserValidation.isValid " ></a >
293337
294338### UserValidation.isValid(instance, handlerArgs) ⇒ <code >\* </code >
@@ -302,53 +346,23 @@ Delegates `handlerArgs` to the registered validation handler.
302346| instance | [ <code >OAuth2Server</code >] ( #OAuth2Server ) |
303347| handlerArgs | <code >\* </code > |
304348
305- <a name =" app " ></a >
349+ <a name =" validateParams " ></a >
306350
307- ## app : <code >Object </code >
308- Wrapped ` WebApp ` with express-style get/post and default use routes.
351+ ## validateParams ⇒ <code >boolean </code >
352+ Abstraction that checks given query/body params against a given schema
309353
310354** Kind** : global constant
311- ** See** : https://docs.meteor.com/packages/webapp.html
312-
313- * [ app] ( #app ) : <code >Object</code >
314- * [ .get(url, handler)] ( #app.get )
315- * [ .post(url, handler)] ( #app.post )
316- * [ .use(args)] ( #app.use )
317-
318- <a name =" app.get " ></a >
319-
320- ### app.get(url, handler)
321- Creates a get route for a given handler
322-
323- ** Kind** : static method of [ <code >app</code >] ( #app )
324-
325- | Param | Type |
326- | --- | --- |
327- | url | <code >string</code > |
328- | handler | <code >function</code > |
329-
330- <a name =" app.post " ></a >
331-
332- ### app.post(url, handler)
333- Creates a post route for a given handler.
334- If headers' content-type does not equal to ` application/x-www-form-urlencoded `
335- then it will be transformed accordingly.
336-
337- ** Kind** : static method of [ <code >app</code >] ( #app )
338-
339- | Param | Type |
340- | --- | --- |
341- | url | <code >string</code > |
342- | handler | <code >function</code > |
343-
344- <a name =" app.use " ></a >
345-
346- ### app.use(args)
347- Default wrapper around ` WebApp.use `
348-
349- ** Kind** : static method of [ <code >app</code >] ( #app )
350355
351356| Param |
352357| --- |
353- | args |
358+ | actualParams |
359+ | requiredParams |
360+ | debug |
361+
362+ <a name =" app " ></a >
354363
364+ ## app : <code >Object</code >
365+ Wrapped ` WebApp ` with express-style get/post and default use routes.
366+
367+ ** Kind** : global constant
368+ ** See** : https://docs.meteor.com/packages/webapp.html
0 commit comments