mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat(oidc): update auth middleware for cookie extraction and OIDC user handling
This commit is contained in:
@@ -18,7 +18,11 @@ type AuditEvent =
|
||||
| "ROLE_CREATED"
|
||||
| "ROLE_UPDATED"
|
||||
| "ROLE_DELETED"
|
||||
| "SETTINGS_UPDATED";
|
||||
| "SETTINGS_UPDATED"
|
||||
| "OIDC_LOGIN_SUCCESS"
|
||||
| "OIDC_USER_CREATED"
|
||||
| "OIDC_USER_LINKED"
|
||||
| "OIDC_LOGIN_FAILED";
|
||||
|
||||
/**
|
||||
* Emit a structured audit log entry for security-relevant events.
|
||||
@@ -60,6 +64,7 @@ function deriveTargetType(event: AuditEvent): string | null {
|
||||
event.startsWith("USER_") ||
|
||||
event.startsWith("LOGIN") ||
|
||||
event.startsWith("PASSWORD") ||
|
||||
event.startsWith("OIDC_") ||
|
||||
event === "LOGOUT"
|
||||
)
|
||||
return "user";
|
||||
|
||||
Reference in New Issue
Block a user