pub struct TokenGrant {
pub access_token: String,
pub refresh_token: Option<String>,
pub expires_at: Option<DateTime<Utc>>,
}Expand description
A successful grant from a provider: token exchange (the back half of
the human’s consent act) or a refresh. Like TokenMaterial, this
type carries credential bytes and follows the same posture — redacted
in Debug, no Serialize impl, because a grant is never evidence:
the journaled connection_refreshed event is. The broker converts it
into TokenMaterial and seals it; nothing else ever holds it.
Fields§
§access_token: StringThe freshly minted access token.
refresh_token: Option<String>The refresh token, where the provider rotates or issues one. When absent on a refresh, the connection’s existing refresh token stands (providers that do not rotate refresh tokens).
expires_at: Option<DateTime<Utc>>The new access token’s expiry, when the provider declares one.
Trait Implementations§
Source§impl Clone for TokenGrant
impl Clone for TokenGrant
Source§impl Debug for TokenGrant
impl Debug for TokenGrant
Source§impl PartialEq for TokenGrant
impl PartialEq for TokenGrant
impl StructuralPartialEq for TokenGrant
Auto Trait Implementations§
impl Freeze for TokenGrant
impl RefUnwindSafe for TokenGrant
impl Send for TokenGrant
impl Sync for TokenGrant
impl Unpin for TokenGrant
impl UnsafeUnpin for TokenGrant
impl UnwindSafe for TokenGrant
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