-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathauthentication-event.interface.ts
More file actions
48 lines (42 loc) · 1.06 KB
/
authentication-event.interface.ts
File metadata and controls
48 lines (42 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
interface AuthenticationEventError {
code: string;
message: string;
}
export interface AuthenticationEventSso {
connectionId: string;
organizationId: string;
sessionId?: string;
}
export interface AuthenticationEventSsoResponse {
connection_id: string;
organization_id: string;
session_id?: string;
}
type AuthenticationEventType =
| 'sso'
| 'password'
| 'oauth'
| 'mfa'
| 'magic_auth'
| 'email_verification';
type AuthenticationEventStatus = 'failed' | 'succeeded';
export type AuthenticationEvent = {
email: string | null;
error?: AuthenticationEventError;
ipAddress: string | null;
sso?: AuthenticationEventSso;
status: AuthenticationEventStatus;
type: AuthenticationEventType;
userAgent: string | null;
userId: string | null;
};
export interface AuthenticationEventResponse {
email: string | null;
error?: AuthenticationEventError;
ip_address: string | null;
sso?: AuthenticationEventSsoResponse;
status: AuthenticationEventStatus;
type: AuthenticationEventType;
user_agent: string | null;
user_id: string | null;
}