fix some stupidity

This commit is contained in:
Evert Prants 2022-03-09 20:44:31 +02:00
parent 96f6555127
commit 8623087976
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
3 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,6 @@ export const authorization = wrap(async (req, res) => {
throw new InvalidClient('Client not found'); throw new InvalidClient('Client not found');
} }
// TODO: multiple redirect URI
if (!(await oauth2.model.client.hasRedirectUri(client))) { if (!(await oauth2.model.client.hasRedirectUri(client))) {
throw new UnsupportedResponseType('The client has not set a redirect uri'); throw new UnsupportedResponseType('The client has not set a redirect uri');
} else if ( } else if (

View File

@ -47,6 +47,7 @@ export interface OAuth2RefreshToken {
* OAuth2 implicit user model * OAuth2 implicit user model
*/ */
export interface OAuth2User { export interface OAuth2User {
id: string | number;
username: string; username: string;
password: string; password: string;
} }

View File

@ -20,8 +20,8 @@ export class OAuth2Provider implements OAuth2 {
express(): RequestHandler { express(): RequestHandler {
return (req, _res, next) => { return (req, _res, next) => {
req.oauth2.logger.debug('OAuth2 Injected into request');
req.oauth2 = this; req.oauth2 = this;
this.logger.debug('OAuth2 Injected into request');
next(); next();
}; };
} }