diff --git a/src/controller/authorization.ts b/src/controller/authorization.ts index 7129f99..cf9cccf 100644 --- a/src/controller/authorization.ts +++ b/src/controller/authorization.ts @@ -99,7 +99,6 @@ export const authorization = wrap(async (req, res) => { throw new InvalidClient('Client not found'); } - // TODO: multiple redirect URI if (!(await oauth2.model.client.hasRedirectUri(client))) { throw new UnsupportedResponseType('The client has not set a redirect uri'); } else if ( diff --git a/src/model/model.ts b/src/model/model.ts index 67963bd..1e6ba76 100644 --- a/src/model/model.ts +++ b/src/model/model.ts @@ -47,6 +47,7 @@ export interface OAuth2RefreshToken { * OAuth2 implicit user model */ export interface OAuth2User { + id: string | number; username: string; password: string; } diff --git a/src/provider.ts b/src/provider.ts index 64d3078..dd7091a 100644 --- a/src/provider.ts +++ b/src/provider.ts @@ -20,8 +20,8 @@ export class OAuth2Provider implements OAuth2 { express(): RequestHandler { return (req, _res, next) => { - req.oauth2.logger.debug('OAuth2 Injected into request'); req.oauth2 = this; + this.logger.debug('OAuth2 Injected into request'); next(); }; }