mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(core): Allow enforcement of MFA usage on instance (#16556)
Co-authored-by: Marc Littlemore <marc@n8n.io> Co-authored-by: Csaba Tuncsik <csaba.tuncsik@gmail.com>
This commit is contained in:
@@ -114,6 +114,7 @@ export interface PublicUser {
|
||||
isOwner?: boolean;
|
||||
featureFlags?: FeatureFlags; // External type from n8n-workflow
|
||||
lastActiveAt?: Date | null;
|
||||
mfaAuthenticated?: boolean;
|
||||
}
|
||||
|
||||
export type UserSettings = Pick<User, 'id' | 'settings'>;
|
||||
@@ -367,6 +368,10 @@ export type APIRequest<
|
||||
browserId?: string;
|
||||
};
|
||||
|
||||
export type AuthenticationInformation = {
|
||||
usedMfa: boolean;
|
||||
};
|
||||
|
||||
export type AuthenticatedRequest<
|
||||
RouteParams = {},
|
||||
ResponseBody = {},
|
||||
@@ -374,6 +379,7 @@ export type AuthenticatedRequest<
|
||||
RequestQuery = {},
|
||||
> = Omit<APIRequest<RouteParams, ResponseBody, RequestBody, RequestQuery>, 'user' | 'cookies'> & {
|
||||
user: User;
|
||||
authInfo?: AuthenticationInformation;
|
||||
cookies: Record<string, string | undefined>;
|
||||
headers: express.Request['headers'] & {
|
||||
'push-ref': string;
|
||||
|
||||
Reference in New Issue
Block a user