pub struct TokenSet { /* private fields */ }
Expand description
§TokenSet
Represents a set of tokens retrieved from either authorization callback or successful token endpoint grant call.
- If there are other properties present, it will be stored in
other
field. Access it viaTokenSet::get_other()
Implementations§
Source§impl TokenSet
impl TokenSet
Sourcepub fn new(params: TokenSetParams) -> Self
pub fn new(params: TokenSetParams) -> Self
Sourcepub fn claims(&self) -> Option<HashMap<String, Value>>
pub fn claims(&self) -> Option<HashMap<String, Value>>
Get claims from the id_token
- This method just decodes and returns the found claims. Does not validate
Sourcepub fn get_access_token(&self) -> Option<String>
pub fn get_access_token(&self) -> Option<String>
Gets the access token
Sourcepub fn get_token_type(&self) -> Option<String>
pub fn get_token_type(&self) -> Option<String>
Gets the access token type
Sourcepub fn get_id_token(&self) -> Option<String>
pub fn get_id_token(&self) -> Option<String>
Gets the raw id token
Sourcepub fn get_refresh_token(&self) -> Option<String>
pub fn get_refresh_token(&self) -> Option<String>
Gets the refresh token
Sourcepub fn get_expires_in(&self) -> Option<u64>
pub fn get_expires_in(&self) -> Option<u64>
Gets the expires in
Sourcepub fn get_expires_at(&self) -> Option<u64>
pub fn get_expires_at(&self) -> Option<u64>
Gets the expires in (seconds)
Sourcepub fn get_session_state(&self) -> Option<String>
pub fn get_session_state(&self) -> Option<String>
Gets the session state from OP
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TokenSet
impl<'de> Deserialize<'de> for TokenSet
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 TokenSet
impl RefUnwindSafe for TokenSet
impl Send for TokenSet
impl Sync for TokenSet
impl Unpin for TokenSet
impl UnwindSafe for TokenSet
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