From 86230879769b10b634689f6203f1271368f6cec8 Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Wed, 9 Mar 2022 20:44:31 +0200 Subject: [PATCH] fix some stupidity --- src/controller/authorization.ts | 1 - src/model/model.ts | 1 + src/provider.ts | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) 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(); }; }