pub struct OidcTokenSet {
pub access_token: String,
pub token_type: Option<String>,
pub id_token: Option<String>,
pub expires_in: i32,
pub refresh_token: Option<String>,
}Expand description
The token set returned upon a successful login flow
Fields§
§access_token: String§token_type: Option<String>§id_token: Option<String>§expires_in: i32§refresh_token: Option<String>Implementations§
Source§impl OidcTokenSet
impl OidcTokenSet
pub async fn access_token() -> Result<String, RauthyError>
Available on crate feature
device-code only.pub async fn id_token() -> Result<Option<String>, RauthyError>
Available on crate feature
device-code only.pub async fn into_refresh_handler( self, client_id: String, client_secret: Option<String>, ) -> Result<(), RauthyError>
Available on crate feature
device-code only.pub async fn into_refresh_handler_with( self, client_id: String, client_secret: Option<String>, root_certificate: Option<RootCertificate>, https_only: RauthyHttpsOnly, danger_insecure: DangerAcceptInvalidCerts, ) -> Result<(), RauthyError>
Available on crate feature
device-code only.Source§impl OidcTokenSet
impl OidcTokenSet
Sourcepub fn id_claims(&self) -> Result<Option<IdToken>, RauthyError>
pub fn id_claims(&self) -> Result<Option<IdToken>, RauthyError>
Returns the user claims from the id_token.
CAUTION: This does NOT validate the signature!
Sourcepub fn danger_claims_unvalidated<T>(token: &str) -> Result<T, RauthyError>where
T: Debug + for<'a> Deserialize<'a>,
pub fn danger_claims_unvalidated<T>(token: &str) -> Result<T, RauthyError>where
T: Debug + for<'a> Deserialize<'a>,
This function will return the claims from a given JWT token.
CAUTION: It does NOT VALIDATE the token signature or any other values! It will only try to decode the payload into the target struct.
Trait Implementations§
Source§impl Debug for OidcTokenSet
impl Debug for OidcTokenSet
Source§impl<'de> Deserialize<'de> for OidcTokenSet
impl<'de> Deserialize<'de> for OidcTokenSet
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 OidcTokenSet
impl RefUnwindSafe for OidcTokenSet
impl Send for OidcTokenSet
impl Sync for OidcTokenSet
impl Unpin for OidcTokenSet
impl UnsafeUnpin for OidcTokenSet
impl UnwindSafe for OidcTokenSet
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