feat(auth): add abuse protection for login and OIDC flows with consent-based authorization handling
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import * as plugins from '../loint-reception.plugins.js';
|
||||
import * as plugins from '../plugins.js';
|
||||
import { type IUser, type IRole } from '../data/index.js';
|
||||
import { type TOidcScope } from '../data/index.js';
|
||||
|
||||
export interface IReq_InternalAuthorization
|
||||
extends plugins.typedRequestInterfaces.implementsTR<
|
||||
@@ -17,3 +18,55 @@ export interface IReq_InternalAuthorization
|
||||
relevantRoles: IRole[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_CompleteOidcAuthorization
|
||||
extends plugins.typedRequestInterfaces.implementsTR<
|
||||
plugins.typedRequestInterfaces.ITypedRequest,
|
||||
IReq_CompleteOidcAuthorization
|
||||
> {
|
||||
method: 'completeOidcAuthorization';
|
||||
request: {
|
||||
jwt: string;
|
||||
clientId: string;
|
||||
redirectUri: string;
|
||||
scope: string;
|
||||
state: string;
|
||||
prompt?: 'none' | 'login' | 'consent';
|
||||
codeChallenge?: string;
|
||||
codeChallengeMethod?: 'S256';
|
||||
nonce?: string;
|
||||
consentApproved?: boolean;
|
||||
};
|
||||
response: {
|
||||
code: string;
|
||||
redirectUrl: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_PrepareOidcAuthorization
|
||||
extends plugins.typedRequestInterfaces.implementsTR<
|
||||
plugins.typedRequestInterfaces.ITypedRequest,
|
||||
IReq_PrepareOidcAuthorization
|
||||
> {
|
||||
method: 'prepareOidcAuthorization';
|
||||
request: {
|
||||
jwt: string;
|
||||
clientId: string;
|
||||
redirectUri: string;
|
||||
scope: string;
|
||||
state: string;
|
||||
prompt?: 'none' | 'login' | 'consent';
|
||||
codeChallenge?: string;
|
||||
codeChallengeMethod?: 'S256';
|
||||
nonce?: string;
|
||||
};
|
||||
response: {
|
||||
status: 'ready' | 'consent_required';
|
||||
clientId: string;
|
||||
appName: string;
|
||||
appUrl: string;
|
||||
logoUrl?: string;
|
||||
requestedScopes: TOidcScope[];
|
||||
grantedScopes: TOidcScope[];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user