pub struct TokenResponse {
pub access_token: String,
pub token_type: String,
pub refresh_token: String,
pub scope: String,
pub expires_in: u32,
pub sub: String,
pub extra: HashMap<String, Value>,
}
Expand description
Response from the OAuth token endpoint containing access credentials.
This struct represents the successful response from an OAuth token exchange, containing the access token and related metadata.
Fields§
§access_token: String
The access token that can be used to access protected resources.
token_type: String
The type of token, typically “Bearer” or “DPoP”.
refresh_token: String
The refresh token that can be used to obtain new access tokens.
scope: String
The scope of access granted by the access token.
expires_in: u32
The lifetime of the access token in seconds.
sub: String
The subject identifier (usually the user’s DID).
extra: HashMap<String, Value>
Additional fields returned by the authorization server.
Trait Implementations§
Source§impl Clone for TokenResponse
impl Clone for TokenResponse
Source§fn clone(&self) -> TokenResponse
fn clone(&self) -> TokenResponse
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<'de> Deserialize<'de> for TokenResponse
impl<'de> Deserialize<'de> for TokenResponse
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 TokenResponse
impl RefUnwindSafe for TokenResponse
impl Send for TokenResponse
impl Sync for TokenResponse
impl Unpin for TokenResponse
impl UnwindSafe for TokenResponse
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