Struct openidconnect::IdTokenClaims
source · [−]pub struct IdTokenClaims<AC, GC> where
AC: AdditionalClaims,
GC: GenderClaim, { /* private fields */ }
Expand description
OpenID Connect ID token claims.
Implementations
sourceimpl<AC, GC> IdTokenClaims<AC, GC> where
AC: AdditionalClaims,
GC: GenderClaim,
impl<AC, GC> IdTokenClaims<AC, GC> where
AC: AdditionalClaims,
GC: GenderClaim,
sourcepub fn new(
issuer: IssuerUrl,
audiences: Vec<Audience>,
expiration: DateTime<Utc>,
issue_time: DateTime<Utc>,
standard_claims: StandardClaims<GC>,
additional_claims: AC
) -> Self
pub fn new(
issuer: IssuerUrl,
audiences: Vec<Audience>,
expiration: DateTime<Utc>,
issue_time: DateTime<Utc>,
standard_claims: StandardClaims<GC>,
additional_claims: AC
) -> Self
Initializes new ID token claims.
sourcepub fn set_issuer(self, issuer: IssuerUrl) -> Self
pub fn set_issuer(self, issuer: IssuerUrl) -> Self
Sets the iss
claim.
sourcepub fn audiences(&self) -> &Vec<Audience>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn audiences(&self) -> &Vec<Audience>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns the aud
claim.
sourcepub fn set_audiences(self, audiences: Vec<Audience>) -> Self
pub fn set_audiences(self, audiences: Vec<Audience>) -> Self
Sets the aud
claim.
sourcepub fn expiration(&self) -> DateTime<Utc>
pub fn expiration(&self) -> DateTime<Utc>
Returns the exp
claim.
sourcepub fn set_expiration(self, expiration: DateTime<Utc>) -> Self
pub fn set_expiration(self, expiration: DateTime<Utc>) -> Self
Sets the exp
claim.
sourcepub fn issue_time(&self) -> DateTime<Utc>
pub fn issue_time(&self) -> DateTime<Utc>
Returns the iat
claim.
sourcepub fn set_issue_time(self, issue_time: DateTime<Utc>) -> Self
pub fn set_issue_time(self, issue_time: DateTime<Utc>) -> Self
Sets the iat
claim.
sourcepub fn set_auth_time(self, auth_time: Option<DateTime<Utc>>) -> Self
pub fn set_auth_time(self, auth_time: Option<DateTime<Utc>>) -> Self
Sets the auth_time
claim.
sourcepub fn auth_context_ref(&self) -> Option<&AuthenticationContextClass>
pub fn auth_context_ref(&self) -> Option<&AuthenticationContextClass>
Returns the acr
claim.
sourcepub fn set_auth_context_ref(
self,
auth_context_ref: Option<AuthenticationContextClass>
) -> Self
pub fn set_auth_context_ref(
self,
auth_context_ref: Option<AuthenticationContextClass>
) -> Self
Sets the acr
claim.
sourcepub fn auth_method_refs(&self) -> Option<&Vec<AuthenticationMethodReference>>
pub fn auth_method_refs(&self) -> Option<&Vec<AuthenticationMethodReference>>
Returns the amr
claim.
sourcepub fn set_auth_method_refs(
self,
auth_method_refs: Option<Vec<AuthenticationMethodReference>>
) -> Self
pub fn set_auth_method_refs(
self,
auth_method_refs: Option<Vec<AuthenticationMethodReference>>
) -> Self
Sets the amr
claim.
Returns the azp
claim.
Sets the azp
claim.
sourcepub fn access_token_hash(&self) -> Option<&AccessTokenHash>
pub fn access_token_hash(&self) -> Option<&AccessTokenHash>
Returns the at_hash
claim.
sourcepub fn set_access_token_hash(
self,
access_token_hash: Option<AccessTokenHash>
) -> Self
pub fn set_access_token_hash(
self,
access_token_hash: Option<AccessTokenHash>
) -> Self
Sets the at_hash
claim.
sourcepub fn code_hash(&self) -> Option<&AuthorizationCodeHash>
pub fn code_hash(&self) -> Option<&AuthorizationCodeHash>
Returns the c_hash
claim.
sourcepub fn set_code_hash(self, code_hash: Option<AuthorizationCodeHash>) -> Self
pub fn set_code_hash(self, code_hash: Option<AuthorizationCodeHash>) -> Self
Sets the c_hash
claim.
sourcepub fn subject(&self) -> &SubjectIdentifier
pub fn subject(&self) -> &SubjectIdentifier
Returns the sub
claim.
sourcepub fn set_subject(self, subject: SubjectIdentifier) -> Self
pub fn set_subject(self, subject: SubjectIdentifier) -> Self
Sets the sub
claim.
sourcepub fn name(&self) -> Option<&LocalizedClaim<EndUserName>>
pub fn name(&self) -> Option<&LocalizedClaim<EndUserName>>
Returns the name
claim.
sourcepub fn set_name(self, name: Option<LocalizedClaim<EndUserName>>) -> Self
pub fn set_name(self, name: Option<LocalizedClaim<EndUserName>>) -> Self
Sets the name
claim.
sourcepub fn given_name(&self) -> Option<&LocalizedClaim<EndUserGivenName>>
pub fn given_name(&self) -> Option<&LocalizedClaim<EndUserGivenName>>
Returns the given_name
claim.
sourcepub fn set_given_name(
self,
given_name: Option<LocalizedClaim<EndUserGivenName>>
) -> Self
pub fn set_given_name(
self,
given_name: Option<LocalizedClaim<EndUserGivenName>>
) -> Self
Sets the given_name
claim.
sourcepub fn family_name(&self) -> Option<&LocalizedClaim<EndUserFamilyName>>
pub fn family_name(&self) -> Option<&LocalizedClaim<EndUserFamilyName>>
Returns the family_name
claim.
sourcepub fn set_family_name(
self,
family_name: Option<LocalizedClaim<EndUserFamilyName>>
) -> Self
pub fn set_family_name(
self,
family_name: Option<LocalizedClaim<EndUserFamilyName>>
) -> Self
Sets the family_name
claim.
sourcepub fn middle_name(&self) -> Option<&LocalizedClaim<EndUserMiddleName>>
pub fn middle_name(&self) -> Option<&LocalizedClaim<EndUserMiddleName>>
Returns the middle_name
claim.
sourcepub fn set_middle_name(
self,
middle_name: Option<LocalizedClaim<EndUserMiddleName>>
) -> Self
pub fn set_middle_name(
self,
middle_name: Option<LocalizedClaim<EndUserMiddleName>>
) -> Self
Sets the middle_name
claim.
sourcepub fn nickname(&self) -> Option<&LocalizedClaim<EndUserNickname>>
pub fn nickname(&self) -> Option<&LocalizedClaim<EndUserNickname>>
Returns the nickname
claim.
sourcepub fn set_nickname(
self,
nickname: Option<LocalizedClaim<EndUserNickname>>
) -> Self
pub fn set_nickname(
self,
nickname: Option<LocalizedClaim<EndUserNickname>>
) -> Self
Sets the nickname
claim.
sourcepub fn preferred_username(&self) -> Option<&EndUserUsername>
pub fn preferred_username(&self) -> Option<&EndUserUsername>
Returns the preferred_username
claim.
sourcepub fn set_preferred_username(
self,
preferred_username: Option<EndUserUsername>
) -> Self
pub fn set_preferred_username(
self,
preferred_username: Option<EndUserUsername>
) -> Self
Sets the preferred_username
claim.
sourcepub fn profile(&self) -> Option<&LocalizedClaim<EndUserProfileUrl>>
pub fn profile(&self) -> Option<&LocalizedClaim<EndUserProfileUrl>>
Returns the profile
claim.
sourcepub fn set_profile(
self,
profile: Option<LocalizedClaim<EndUserProfileUrl>>
) -> Self
pub fn set_profile(
self,
profile: Option<LocalizedClaim<EndUserProfileUrl>>
) -> Self
Sets the profile
claim.
sourcepub fn picture(&self) -> Option<&LocalizedClaim<EndUserPictureUrl>>
pub fn picture(&self) -> Option<&LocalizedClaim<EndUserPictureUrl>>
Returns the picture
claim.
sourcepub fn set_picture(
self,
picture: Option<LocalizedClaim<EndUserPictureUrl>>
) -> Self
pub fn set_picture(
self,
picture: Option<LocalizedClaim<EndUserPictureUrl>>
) -> Self
Sets the picture
claim.
sourcepub fn website(&self) -> Option<&LocalizedClaim<EndUserWebsiteUrl>>
pub fn website(&self) -> Option<&LocalizedClaim<EndUserWebsiteUrl>>
Returns the website
claim.
sourcepub fn set_website(
self,
website: Option<LocalizedClaim<EndUserWebsiteUrl>>
) -> Self
pub fn set_website(
self,
website: Option<LocalizedClaim<EndUserWebsiteUrl>>
) -> Self
Sets the website
claim.
sourcepub fn email(&self) -> Option<&EndUserEmail>
pub fn email(&self) -> Option<&EndUserEmail>
Returns the email
claim.
sourcepub fn set_email(self, email: Option<EndUserEmail>) -> Self
pub fn set_email(self, email: Option<EndUserEmail>) -> Self
Sets the email
claim.
sourcepub fn email_verified(&self) -> Option<bool>
pub fn email_verified(&self) -> Option<bool>
Returns the email_verified
claim.
sourcepub fn set_email_verified(self, email_verified: Option<bool>) -> Self
pub fn set_email_verified(self, email_verified: Option<bool>) -> Self
Sets the email_verified
claim.
sourcepub fn set_gender(self, gender: Option<GC>) -> Self
pub fn set_gender(self, gender: Option<GC>) -> Self
Sets the gender
claim.
sourcepub fn birthday(&self) -> Option<&EndUserBirthday>
pub fn birthday(&self) -> Option<&EndUserBirthday>
Returns the birthday
claim.
sourcepub fn set_birthday(self, birthday: Option<EndUserBirthday>) -> Self
pub fn set_birthday(self, birthday: Option<EndUserBirthday>) -> Self
Sets the birthday
claim.
sourcepub fn zoneinfo(&self) -> Option<&EndUserTimezone>
pub fn zoneinfo(&self) -> Option<&EndUserTimezone>
Returns the zoneinfo
claim.
sourcepub fn set_zoneinfo(self, zoneinfo: Option<EndUserTimezone>) -> Self
pub fn set_zoneinfo(self, zoneinfo: Option<EndUserTimezone>) -> Self
Sets the zoneinfo
claim.
sourcepub fn locale(&self) -> Option<&LanguageTag>
pub fn locale(&self) -> Option<&LanguageTag>
Returns the locale
claim.
sourcepub fn set_locale(self, locale: Option<LanguageTag>) -> Self
pub fn set_locale(self, locale: Option<LanguageTag>) -> Self
Sets the locale
claim.
sourcepub fn phone_number(&self) -> Option<&EndUserPhoneNumber>
pub fn phone_number(&self) -> Option<&EndUserPhoneNumber>
Returns the phone_number
claim.
sourcepub fn set_phone_number(self, phone_number: Option<EndUserPhoneNumber>) -> Self
pub fn set_phone_number(self, phone_number: Option<EndUserPhoneNumber>) -> Self
Sets the phone_number
claim.
sourcepub fn phone_number_verified(&self) -> Option<bool>
pub fn phone_number_verified(&self) -> Option<bool>
Returns the phone_number_verified
claim.
sourcepub fn set_phone_number_verified(
self,
phone_number_verified: Option<bool>
) -> Self
pub fn set_phone_number_verified(
self,
phone_number_verified: Option<bool>
) -> Self
Sets the phone_number_verified
claim.
sourcepub fn address(&self) -> Option<&AddressClaim>
pub fn address(&self) -> Option<&AddressClaim>
Returns the address
claim.
sourcepub fn set_address(self, address: Option<AddressClaim>) -> Self
pub fn set_address(self, address: Option<AddressClaim>) -> Self
Sets the address
claim.
sourcepub fn updated_at(&self) -> Option<DateTime<Utc>>
pub fn updated_at(&self) -> Option<DateTime<Utc>>
Returns the updated_at
claim.
sourcepub fn set_updated_at(self, updated_at: Option<DateTime<Utc>>) -> Self
pub fn set_updated_at(self, updated_at: Option<DateTime<Utc>>) -> Self
Sets the updated_at
claim.
sourcepub fn additional_claims(&self) -> &AC
pub fn additional_claims(&self) -> &AC
Returns additional ID token claims.
sourcepub fn additional_claims_mut(&mut self) -> &mut AC
pub fn additional_claims_mut(&mut self) -> &mut AC
Returns mutable additional ID token claims.
Trait Implementations
sourceimpl<AC: Clone, GC: Clone> Clone for IdTokenClaims<AC, GC> where
AC: AdditionalClaims,
GC: GenderClaim,
impl<AC: Clone, GC: Clone> Clone for IdTokenClaims<AC, GC> where
AC: AdditionalClaims,
GC: GenderClaim,
sourcefn clone(&self) -> IdTokenClaims<AC, GC>
fn clone(&self) -> IdTokenClaims<AC, GC>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<AC: Debug, GC: Debug> Debug for IdTokenClaims<AC, GC> where
AC: AdditionalClaims,
GC: GenderClaim,
impl<AC: Debug, GC: Debug> Debug for IdTokenClaims<AC, GC> where
AC: AdditionalClaims,
GC: GenderClaim,
sourceimpl<'de, AC, GC> Deserialize<'de> for IdTokenClaims<AC, GC> where
AC: AdditionalClaims,
GC: GenderClaim,
GC: GenderClaim,
AC: AdditionalClaims,
impl<'de, AC, GC> Deserialize<'de> for IdTokenClaims<AC, GC> where
AC: AdditionalClaims,
GC: GenderClaim,
GC: GenderClaim,
AC: AdditionalClaims,
sourcefn 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
sourceimpl<AC: PartialEq, GC: PartialEq> PartialEq<IdTokenClaims<AC, GC>> for IdTokenClaims<AC, GC> where
AC: AdditionalClaims,
GC: GenderClaim,
impl<AC: PartialEq, GC: PartialEq> PartialEq<IdTokenClaims<AC, GC>> for IdTokenClaims<AC, GC> where
AC: AdditionalClaims,
GC: GenderClaim,
sourcefn eq(&self, other: &IdTokenClaims<AC, GC>) -> bool
fn eq(&self, other: &IdTokenClaims<AC, GC>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &IdTokenClaims<AC, GC>) -> bool
fn ne(&self, other: &IdTokenClaims<AC, GC>) -> bool
This method tests for !=
.
sourceimpl<AC, GC> Serialize for IdTokenClaims<AC, GC> where
AC: AdditionalClaims,
GC: GenderClaim,
GC: GenderClaim,
AC: AdditionalClaims,
impl<AC, GC> Serialize for IdTokenClaims<AC, GC> where
AC: AdditionalClaims,
GC: GenderClaim,
GC: GenderClaim,
AC: AdditionalClaims,
impl<AC, GC> StructuralPartialEq for IdTokenClaims<AC, GC> where
AC: AdditionalClaims,
GC: GenderClaim,
Auto Trait Implementations
impl<AC, GC> RefUnwindSafe for IdTokenClaims<AC, GC> where
AC: RefUnwindSafe,
GC: RefUnwindSafe,
impl<AC, GC> Send for IdTokenClaims<AC, GC> where
AC: Send,
GC: Send,
impl<AC, GC> Sync for IdTokenClaims<AC, GC> where
AC: Sync,
GC: Sync,
impl<AC, GC> Unpin for IdTokenClaims<AC, GC> where
AC: Unpin,
GC: Unpin,
impl<AC, GC> UnwindSafe for IdTokenClaims<AC, GC> where
AC: UnwindSafe,
GC: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more