pub struct RevocableClient {
pub pubkey: PublicKey,
pub created_at: TimestampMs,
pub expires_at: Option<TimestampMs>,
pub label: Option<String>,
pub scope: Scope,
pub is_revoked: bool,
}Expand description
Information about a revocable client.
Each client is issued a RevocableClientCert whose pubkey is saved here.
Fields§
§pubkey: PublicKeyThe client’s cert pubkey.
created_at: TimestampMsWhen we first issued the client cert and created this client.
expires_at: Option<TimestampMs>The time after which the server will no longer accept this client.
None indicates that the client will never expire (use carefully!).
This expiration time can be extended at any time.
label: Option<String>Optional user-provided label for this client.
scope: ScopeThe authorization scopes allowed for this client.
is_revoked: boolWhether this client has been revoked. Revocation is permanent.
Implementations§
Source§impl RevocableClient
impl RevocableClient
Sourcepub const MAX_LABEL_LEN: usize = 64
pub const MAX_LABEL_LEN: usize = 64
Limit label length to 64 bytes
Sourcepub fn is_valid_at(&self, now: TimestampMs) -> bool
pub fn is_valid_at(&self, now: TimestampMs) -> bool
Whether the client is valid at a given time (not revoked, not expired).
Sourcepub fn is_expired_at(&self, now: TimestampMs) -> bool
pub fn is_expired_at(&self, now: TimestampMs) -> bool
Whether the client is expired at the given time.
Source§impl RevocableClient
impl RevocableClient
Sourcepub fn update(&self, req: UpdateClientRequest) -> Result<Self>
pub fn update(&self, req: UpdateClientRequest) -> Result<Self>
Apply an update to this client, returning a copy with updates applied.
Trait Implementations§
Source§impl Clone for RevocableClient
impl Clone for RevocableClient
Source§fn clone(&self) -> RevocableClient
fn clone(&self) -> RevocableClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more