pub struct Token {
pub token: String,
pub token_type: String,
pub expires_at: Option<OffsetDateTime>,
pub metadata: Option<HashMap<String, String>>,
}
Expand description
Represents an auth token.
Fields§
§token: String
The actual token string.
This is the value used in Authorization:
header.
token_type: String
The type of the token.
The most common type is "Bearer"
but other types may appear in the
future.
expires_at: Option<OffsetDateTime>
The instant at which the token expires.
If None
, the token does not expire or its expiration is unknown.
metadata: Option<HashMap<String, String>>
Optional metadata associated with the token.
This might include information like granted scopes or other claims.
Trait Implementations§
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
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