pub struct ApiKeyRecord {
pub id: Uuid,
pub tenant_id: TenantId,
pub name: String,
pub key_hash: String,
pub key_prefix: String,
pub role: ApiKeyRole,
pub created_at: DateTime<Utc>,
pub revoked_at: Option<DateTime<Utc>>,
}Expand description
A stored API key record (the plaintext key is never persisted).
Fields§
§id: UuidUnique identifier for this key.
tenant_id: TenantIdTenant this key belongs to.
name: StringHuman-readable name / label for the key.
key_hash: StringSHA-256 hex digest of the plaintext key.
key_prefix: StringKey prefix for identification (e.g. llmt_ab12...).
role: ApiKeyRoleRole granted by this key.
created_at: DateTime<Utc>When the key was created.
revoked_at: Option<DateTime<Utc>>When the key was revoked (None if still active).
Trait Implementations§
Source§impl Clone for ApiKeyRecord
impl Clone for ApiKeyRecord
Source§fn clone(&self) -> ApiKeyRecord
fn clone(&self) -> ApiKeyRecord
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ComposeSchema for ApiKeyRecord
impl ComposeSchema for ApiKeyRecord
Source§impl Debug for ApiKeyRecord
impl Debug for ApiKeyRecord
Source§impl<'de> Deserialize<'de> for ApiKeyRecord
impl<'de> Deserialize<'de> for ApiKeyRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ApiKeyRecord
impl Serialize for ApiKeyRecord
Auto Trait Implementations§
impl Freeze for ApiKeyRecord
impl RefUnwindSafe for ApiKeyRecord
impl Send for ApiKeyRecord
impl Sync for ApiKeyRecord
impl Unpin for ApiKeyRecord
impl UnsafeUnpin for ApiKeyRecord
impl UnwindSafe for ApiKeyRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more