pub struct AdminUserExport {
pub id: String,
pub email: String,
pub display_name: String,
pub role: String,
pub credential_hash: String,
pub credential_roles: Vec<String>,
}Expand description
A single admin user plus their pre-hashed credential, exported by the leader during a cluster join so the joiner can adopt the cluster’s admin identity without re-hashing any password.
This struct is serialized to JSON, sealed-box-encrypted to the joiner’s
secrets_pubkey, and carried in ClusterJoinResponse::admin_identity.
It deliberately lives in zlayer-types (not zlayer-api) so the CLI/daemon
joiner side can deserialize it without depending on zlayer-api.
Fields§
§id: StringStable user id (UUIDv4 string). Preserved verbatim on import so the
imported row matches the leader’s.
email: StringPrimary login identifier (lower-cased email).
display_name: StringHuman-readable display name.
role: StringRole string (“admin” / “user”).
credential_hash: StringPre-computed argon2id PHC-string hash of the user’s password. The joiner stores this AS-IS — it never sees or re-hashes the password.
credential_roles: Vec<String>Credential roles array (e.g. ["admin"]).
Trait Implementations§
Source§impl Clone for AdminUserExport
impl Clone for AdminUserExport
Source§fn clone(&self) -> AdminUserExport
fn clone(&self) -> AdminUserExport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more