pub struct IdTokenFields<AC, EF, GC, JE, JS>where
AC: AdditionalClaims,
EF: ExtraTokenFields,
GC: GenderClaim,
JE: JweContentEncryptionAlgorithm<KeyType = JS::KeyType>,
JS: JwsSigningAlgorithm,{ /* private fields */ }
Expand description
Extends the base OAuth2 token response with an ID token.
Implementations§
Source§impl<AC, EF, GC, JE, JS> IdTokenFields<AC, EF, GC, JE, JS>where
AC: AdditionalClaims,
EF: ExtraTokenFields,
GC: GenderClaim,
JE: JweContentEncryptionAlgorithm<KeyType = JS::KeyType>,
JS: JwsSigningAlgorithm,
impl<AC, EF, GC, JE, JS> IdTokenFields<AC, EF, GC, JE, JS>where
AC: AdditionalClaims,
EF: ExtraTokenFields,
GC: GenderClaim,
JE: JweContentEncryptionAlgorithm<KeyType = JS::KeyType>,
JS: JwsSigningAlgorithm,
Sourcepub fn new(id_token: Option<IdToken<AC, GC, JE, JS>>, extra_fields: EF) -> Self
pub fn new(id_token: Option<IdToken<AC, GC, JE, JS>>, extra_fields: EF) -> Self
Initializes new ID token fields containing the specified IdToken
and extra fields.
Sourcepub fn id_token(&self) -> Option<&IdToken<AC, GC, JE, JS>>
pub fn id_token(&self) -> Option<&IdToken<AC, GC, JE, JS>>
Returns the IdToken
contained in the OAuth2 token response.
Sourcepub fn extra_fields(&self) -> &EF
pub fn extra_fields(&self) -> &EF
Returns the extra fields contained in the OAuth2 token response.
Trait Implementations§
Source§impl<AC, EF, GC, JE, JS> Clone for IdTokenFields<AC, EF, GC, JE, JS>where
AC: AdditionalClaims + Clone,
EF: ExtraTokenFields + Clone,
GC: GenderClaim + Clone,
JE: JweContentEncryptionAlgorithm<KeyType = JS::KeyType> + Clone,
JS: JwsSigningAlgorithm + Clone,
impl<AC, EF, GC, JE, JS> Clone for IdTokenFields<AC, EF, GC, JE, JS>where
AC: AdditionalClaims + Clone,
EF: ExtraTokenFields + Clone,
GC: GenderClaim + Clone,
JE: JweContentEncryptionAlgorithm<KeyType = JS::KeyType> + Clone,
JS: JwsSigningAlgorithm + Clone,
Source§fn clone(&self) -> IdTokenFields<AC, EF, GC, JE, JS>
fn clone(&self) -> IdTokenFields<AC, EF, GC, JE, JS>
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<AC, EF, GC, JE, JS> Debug for IdTokenFields<AC, EF, GC, JE, JS>where
AC: AdditionalClaims + Debug,
EF: ExtraTokenFields + Debug,
GC: GenderClaim + Debug,
JE: JweContentEncryptionAlgorithm<KeyType = JS::KeyType> + Debug,
JS: JwsSigningAlgorithm + Debug,
impl<AC, EF, GC, JE, JS> Debug for IdTokenFields<AC, EF, GC, JE, JS>where
AC: AdditionalClaims + Debug,
EF: ExtraTokenFields + Debug,
GC: GenderClaim + Debug,
JE: JweContentEncryptionAlgorithm<KeyType = JS::KeyType> + Debug,
JS: JwsSigningAlgorithm + Debug,
Source§impl<'de, AC, EF, GC, JE, JS> Deserialize<'de> for IdTokenFields<AC, EF, GC, JE, JS>where
AC: AdditionalClaims,
EF: ExtraTokenFields,
GC: GenderClaim,
JE: JweContentEncryptionAlgorithm<KeyType = JS::KeyType>,
JS: JwsSigningAlgorithm,
impl<'de, AC, EF, GC, JE, JS> Deserialize<'de> for IdTokenFields<AC, EF, GC, JE, JS>where
AC: AdditionalClaims,
EF: ExtraTokenFields,
GC: GenderClaim,
JE: JweContentEncryptionAlgorithm<KeyType = JS::KeyType>,
JS: JwsSigningAlgorithm,
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
Source§impl<AC, EF, GC, JE, JS> PartialEq for IdTokenFields<AC, EF, GC, JE, JS>where
AC: AdditionalClaims + PartialEq,
EF: ExtraTokenFields + PartialEq,
GC: GenderClaim + PartialEq,
JE: JweContentEncryptionAlgorithm<KeyType = JS::KeyType> + PartialEq,
JS: JwsSigningAlgorithm + PartialEq,
impl<AC, EF, GC, JE, JS> PartialEq for IdTokenFields<AC, EF, GC, JE, JS>where
AC: AdditionalClaims + PartialEq,
EF: ExtraTokenFields + PartialEq,
GC: GenderClaim + PartialEq,
JE: JweContentEncryptionAlgorithm<KeyType = JS::KeyType> + PartialEq,
JS: JwsSigningAlgorithm + PartialEq,
Source§fn eq(&self, other: &IdTokenFields<AC, EF, GC, JE, JS>) -> bool
fn eq(&self, other: &IdTokenFields<AC, EF, GC, JE, JS>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl<AC, EF, GC, JE, JS> Serialize for IdTokenFields<AC, EF, GC, JE, JS>where
AC: AdditionalClaims,
EF: ExtraTokenFields,
GC: GenderClaim,
JE: JweContentEncryptionAlgorithm<KeyType = JS::KeyType>,
JS: JwsSigningAlgorithm,
impl<AC, EF, GC, JE, JS> Serialize for IdTokenFields<AC, EF, GC, JE, JS>where
AC: AdditionalClaims,
EF: ExtraTokenFields,
GC: GenderClaim,
JE: JweContentEncryptionAlgorithm<KeyType = JS::KeyType>,
JS: JwsSigningAlgorithm,
impl<AC, EF, GC, JE, JS> ExtraTokenFields for IdTokenFields<AC, EF, GC, JE, JS>where
AC: AdditionalClaims,
EF: ExtraTokenFields,
GC: GenderClaim,
JE: JweContentEncryptionAlgorithm<KeyType = JS::KeyType>,
JS: JwsSigningAlgorithm,
impl<AC, EF, GC, JE, JS> StructuralPartialEq for IdTokenFields<AC, EF, GC, JE, JS>where
AC: AdditionalClaims,
EF: ExtraTokenFields,
GC: GenderClaim,
JE: JweContentEncryptionAlgorithm<KeyType = JS::KeyType>,
JS: JwsSigningAlgorithm,
Auto Trait Implementations§
impl<AC, EF, GC, JE, JS> Freeze for IdTokenFields<AC, EF, GC, JE, JS>
impl<AC, EF, GC, JE, JS> RefUnwindSafe for IdTokenFields<AC, EF, GC, JE, JS>where
EF: RefUnwindSafe,
JE: RefUnwindSafe,
JS: RefUnwindSafe,
GC: RefUnwindSafe,
AC: RefUnwindSafe,
impl<AC, EF, GC, JE, JS> Send for IdTokenFields<AC, EF, GC, JE, JS>
impl<AC, EF, GC, JE, JS> Sync for IdTokenFields<AC, EF, GC, JE, JS>
impl<AC, EF, GC, JE, JS> Unpin for IdTokenFields<AC, EF, GC, JE, JS>
impl<AC, EF, GC, JE, JS> UnwindSafe for IdTokenFields<AC, EF, GC, JE, JS>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more