mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Address PR suggestions
This commit is contained in:
@@ -572,6 +572,7 @@ interface UserActorMetadata {
|
||||
email?: string | null;
|
||||
username: string;
|
||||
permission?: Record<string, unknown>;
|
||||
authMethod?: string;
|
||||
}
|
||||
|
||||
interface ServiceActorMetadata {
|
||||
@@ -2662,10 +2663,6 @@ interface OrgAdminBypassSSOEvent {
|
||||
interface UserLoginEvent {
|
||||
type: EventType.USER_LOGIN;
|
||||
metadata: {
|
||||
email: string;
|
||||
userAgent: string;
|
||||
ipAddress: string;
|
||||
authMethod: string;
|
||||
organizationId?: string;
|
||||
organizationName?: string;
|
||||
authProvider?: string;
|
||||
@@ -2675,12 +2672,8 @@ interface UserLoginEvent {
|
||||
interface SelectOrganizationEvent {
|
||||
type: EventType.SELECT_ORGANIZATION;
|
||||
metadata: {
|
||||
email: string;
|
||||
userAgent: string;
|
||||
ipAddress: string;
|
||||
organizationId: string;
|
||||
organizationName: string;
|
||||
authMethod: string;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -465,16 +465,14 @@ export const authLoginServiceFactory = ({
|
||||
metadata: {
|
||||
email: userEnc.email,
|
||||
userId: userEnc.userId,
|
||||
username: userEnc.username
|
||||
username: userEnc.username,
|
||||
authMethod
|
||||
}
|
||||
},
|
||||
event: {
|
||||
type: EventType.USER_LOGIN,
|
||||
metadata: {
|
||||
email,
|
||||
userAgent,
|
||||
ipAddress: ip,
|
||||
authMethod
|
||||
organizationId
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -682,18 +680,15 @@ export const authLoginServiceFactory = ({
|
||||
metadata: {
|
||||
email: user.email,
|
||||
userId: user.id,
|
||||
username: user.username
|
||||
username: user.username,
|
||||
authMethod: decodedToken.authMethod
|
||||
}
|
||||
},
|
||||
event: {
|
||||
type: EventType.SELECT_ORGANIZATION,
|
||||
metadata: {
|
||||
email: user.email || "",
|
||||
userAgent,
|
||||
ipAddress,
|
||||
organizationId,
|
||||
organizationName: selectedOrg.name,
|
||||
authMethod: decodedToken.authMethod
|
||||
organizationName: selectedOrg.name
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1102,16 +1097,13 @@ export const authLoginServiceFactory = ({
|
||||
metadata: {
|
||||
email: userEnc.email,
|
||||
userId: userEnc.userId,
|
||||
username: userEnc.username
|
||||
username: userEnc.username,
|
||||
authMethod: decodedProviderToken.authMethod
|
||||
}
|
||||
},
|
||||
event: {
|
||||
type: EventType.USER_LOGIN,
|
||||
metadata: {
|
||||
email,
|
||||
userAgent,
|
||||
ipAddress: ip,
|
||||
authMethod: decodedProviderToken.authMethod,
|
||||
organizationId,
|
||||
...(isAuthMethodSaml(decodedProviderToken.authMethod) && {
|
||||
authProvider: decodedProviderToken.authMethod
|
||||
|
||||
Reference in New Issue
Block a user