feat(username|email): pass1: normalize auth.user data

username: now optional, if defined 2..64 chars
    password: now optional (no mode __NO_PASSWORD...__)
    oidc: now optional

    important: if need Nextcloud, username must be defined
This commit is contained in:
Edouard Vanbelle
2026-06-02 21:21:24 +02:00
parent 37b1c2703b
commit d57a50d056
17 changed files with 418 additions and 247 deletions
@@ -85,7 +85,7 @@ impl UserLifecycleHook for ExternalIdentityLifecycleHook {
target: "audit",
event = "external_user.created",
user_id = %user.id(),
username = %user.username(),
username = %user.display_for_audit(),
email = %user.email(),
);
}
@@ -98,7 +98,7 @@ impl UserLifecycleHook for ExternalIdentityLifecycleHook {
target: "audit",
event = "external_user.login",
user_id = %user.id(),
username = %user.username(),
username = %user.display_for_audit(),
first_login = user.last_login_at().is_none(),
);
}