pub struct Profile {
pub id: String,
pub identity: ProfileIdentity,
pub name: String,
pub email: String,
pub avatar_base64: Option<String>,
pub avatar_url: Option<String>,
pub created_at: DateTime<Utc>,
pub last_used_at: DateTime<Utc>,
}Expand description
Profile metadata stored in profiles.json.
Each profile represents a Google-authenticated user account, containing identity information and serving as a container for threads and BYOK keys.
Fields§
§id: StringFilesystem-safe stable ID derived from provider issuer and subject.
identity: ProfileIdentityImmutable provider identity. This is the actual account key.
name: StringDisplay name from Google account.
email: StringEmail address from Google account.
avatar_base64: Option<String>Base64 PNG data URL for the cached avatar image.
avatar_url: Option<String>Original Google avatar URL for online fallback and refresh.
created_at: DateTime<Utc>When the profile was first created.
last_used_at: DateTime<Utc>Last time this profile was used/logged into.
Implementations§
Source§impl Profile
impl Profile
Sourcepub fn new_google(
issuer: &str,
subject: &str,
email: &str,
name: &str,
avatar_base64: Option<String>,
avatar_url: Option<String>,
) -> Self
pub fn new_google( issuer: &str, subject: &str, email: &str, name: &str, avatar_base64: Option<String>, avatar_url: Option<String>, ) -> Self
Create a new profile from a validated Google OIDC identity.
Sourcepub fn id_from_identity(identity: &ProfileIdentity) -> String
pub fn id_from_identity(identity: &ProfileIdentity) -> String
Generate a deterministic filesystem-safe profile ID from provider identity.
Sourcepub fn is_canonical_id(id: &str) -> bool
pub fn is_canonical_id(id: &str) -> bool
Return whether an ID uses the canonical Google profile format.
Sourcepub fn has_canonical_id(&self) -> bool
pub fn has_canonical_id(&self) -> bool
Return whether this profile ID matches its immutable Google identity.