73 lines
1.7 KiB
TypeScript
73 lines
1.7 KiB
TypeScript
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<
|
|
plugins.typedRequestInterfaces.ITypedRequest,
|
|
IReq_InternalAuthorization
|
|
> {
|
|
method: '';
|
|
request: {
|
|
accountData: IUser;
|
|
jwt: string;
|
|
};
|
|
response: {
|
|
accountData: IUser;
|
|
jwt: string;
|
|
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[];
|
|
};
|
|
}
|