-const oAuthServer = new OAuthServer({
- useErrorHandler: true,
- accessTokenLifetime: OAUTH_LIFETIME.ACCESS_TOKEN,
- refreshTokenLifetime: OAUTH_LIFETIME.REFRESH_TOKEN,
- model: require('../lib/oauth-model')
-})
+function authenticate (req: express.Request, res: express.Response, next: express.NextFunction, authenticateInQuery = false) {
+ const options = authenticateInQuery ? { allowBearerTokensInQueryString: true } : {}