fix some stupidity
This commit is contained in:
parent
96f6555127
commit
8623087976
@ -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 (
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user