pub struct GrokAuthEntry {
pub key: Option<String>,
pub refresh_token: Option<String>,
pub expires_at: Option<String>,
pub oidc_issuer: Option<String>,
pub oidc_client_id: Option<String>,
pub user_id: Option<String>,
pub principal_type: Option<String>,
pub principal_id: Option<String>,
}Expand description
One entry of ~/.grok/auth.json, keyed in the file by login scope
("<issuer>::<client_id>", "xai::api_key", or the legacy sign-in URL).
The access token is the key field, not a field named access_token.
Debug is written by hand so no bearer, refresh token, or account
identifier can reach a log or assertion message.
Fields§
§key: Option<String>Bearer access token (a JWT).
refresh_token: Option<String>Refresh token (rotates on refresh; must be persisted).
expires_at: Option<String>Access-token expiry as an RFC3339 timestamp.
oidc_issuer: Option<String>OIDC issuer this login came from; the base for token-endpoint discovery.
oidc_client_id: Option<String>OAuth client id, sent as a form field on refresh.
user_id: Option<String>Account id, sent as the x-userid header.
principal_type: Option<String>Principal kind for a team login, re-sent on refresh.
principal_id: Option<String>Principal id for a team login, re-sent on refresh.
Trait Implementations§
Source§impl Clone for GrokAuthEntry
impl Clone for GrokAuthEntry
Source§fn clone(&self) -> GrokAuthEntry
fn clone(&self) -> GrokAuthEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GrokAuthEntry
impl Debug for GrokAuthEntry
Source§impl Default for GrokAuthEntry
impl Default for GrokAuthEntry
Source§fn default() -> GrokAuthEntry
fn default() -> GrokAuthEntry
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GrokAuthEntry
impl<'de> Deserialize<'de> for GrokAuthEntry
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
Auto Trait Implementations§
impl Freeze for GrokAuthEntry
impl RefUnwindSafe for GrokAuthEntry
impl Send for GrokAuthEntry
impl Sync for GrokAuthEntry
impl Unpin for GrokAuthEntry
impl UnsafeUnpin for GrokAuthEntry
impl UnwindSafe for GrokAuthEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more