[][src]Struct openidconnect::UserInfoClaims

pub struct UserInfoClaims<AC: AdditionalClaims, GC: GenderClaim>(_);

User info claims.

Methods

impl<AC, GC> UserInfoClaims<AC, GC> where
    AC: AdditionalClaims,
    GC: GenderClaim
[src]

pub fn new(standard_claims: StandardClaims<GC>, additional_claims: AC) -> Self[src]

Initializes user info claims.

pub fn from_json<RE>(
    user_info_json: &[u8],
    expected_subject: Option<&SubjectIdentifier>
) -> Result<Self, UserInfoError<RE>> where
    RE: Fail
[src]

Initializes user info claims from the provided raw JSON response.

If an expected_subject is provided, this function verifies that the user info claims contain the expected subject and returns an error otherwise.

pub fn issuer(&self) -> Option<&IssuerUrl>[src]

Returns the issuer claim.

pub fn set_issuer(self, issuer: Option<IssuerUrl>) -> Self[src]

Sets the issuer claim.

pub fn audiences(&self) -> Option<&Vec<Audience>>[src]

Returns the aud claim.

pub fn set_audiences(self, audiences: Option<Vec<Audience>>) -> Self[src]

Sets the aud claim.

pub fn subject(&self) -> &SubjectIdentifier[src]

Returns the sub claim.

pub fn set_subject(&mut self, subject: SubjectIdentifier)[src]

Sets the sub claim.

pub fn name(&self) -> Option<&LocalizedClaim<EndUserName>>[src]

Returns the name claim.

pub fn set_name(self, name: Option<LocalizedClaim<EndUserName>>) -> Self[src]

Sets the name claim.

pub fn given_name(&self) -> Option<&LocalizedClaim<EndUserGivenName>>[src]

Returns the given_name claim.

pub fn set_given_name(
    self,
    given_name: Option<LocalizedClaim<EndUserGivenName>>
) -> Self
[src]

Sets the given_name claim.

pub fn family_name(&self) -> Option<&LocalizedClaim<EndUserFamilyName>>[src]

Returns the family_name claim.

pub fn set_family_name(
    self,
    family_name: Option<LocalizedClaim<EndUserFamilyName>>
) -> Self
[src]

Sets the family_name claim.

pub fn middle_name(&self) -> Option<&LocalizedClaim<EndUserMiddleName>>[src]

Returns the middle_name claim.

pub fn set_middle_name(
    self,
    middle_name: Option<LocalizedClaim<EndUserMiddleName>>
) -> Self
[src]

Sets the middle_name claim.

pub fn nickname(&self) -> Option<&LocalizedClaim<EndUserNickname>>[src]

Returns the nickname claim.

pub fn set_nickname(
    self,
    nickname: Option<LocalizedClaim<EndUserNickname>>
) -> Self
[src]

Sets the nickname claim.

pub fn preferred_username(&self) -> Option<&EndUserUsername>[src]

Returns the preferred_username claim.

pub fn set_preferred_username(
    self,
    preferred_username: Option<EndUserUsername>
) -> Self
[src]

Sets the preferred_username claim.

pub fn profile(&self) -> Option<&LocalizedClaim<EndUserProfileUrl>>[src]

Returns the profile claim.

pub fn set_profile(
    self,
    profile: Option<LocalizedClaim<EndUserProfileUrl>>
) -> Self
[src]

Sets the profile claim.

pub fn picture(&self) -> Option<&LocalizedClaim<EndUserPictureUrl>>[src]

Returns the picture claim.

pub fn set_picture(
    self,
    picture: Option<LocalizedClaim<EndUserPictureUrl>>
) -> Self
[src]

Sets the picture claim.

pub fn website(&self) -> Option<&LocalizedClaim<EndUserWebsiteUrl>>[src]

Returns the website claim.

pub fn set_website(
    self,
    website: Option<LocalizedClaim<EndUserWebsiteUrl>>
) -> Self
[src]

Sets the website claim.

pub fn email(&self) -> Option<&EndUserEmail>[src]

Returns the email claim.

pub fn set_email(self, email: Option<EndUserEmail>) -> Self[src]

Sets the email claim.

pub fn email_verified(&self) -> Option<bool>[src]

Returns the email_verified claim.

pub fn set_email_verified(self, email_verified: Option<bool>) -> Self[src]

Sets the email_verified claim.

pub fn gender(&self) -> Option<&GC>[src]

Returns the gender claim.

pub fn set_gender(self, gender: Option<GC>) -> Self[src]

Sets the gender claim.

pub fn birthday(&self) -> Option<&EndUserBirthday>[src]

Returns the birthday claim.

pub fn set_birthday(self, birthday: Option<EndUserBirthday>) -> Self[src]

Sets the birthday claim.

pub fn zoneinfo(&self) -> Option<&EndUserTimezone>[src]

Returns the zoneinfo claim.

pub fn set_zoneinfo(self, zoneinfo: Option<EndUserTimezone>) -> Self[src]

Sets the zoneinfo claim.

pub fn locale(&self) -> Option<&LanguageTag>[src]

Returns the locale claim.

pub fn set_locale(self, locale: Option<LanguageTag>) -> Self[src]

Sets the locale claim.

pub fn phone_number(&self) -> Option<&EndUserPhoneNumber>[src]

Returns the phone_number claim.

pub fn set_phone_number(self, phone_number: Option<EndUserPhoneNumber>) -> Self[src]

Sets the phone_number claim.

pub fn phone_number_verified(&self) -> Option<bool>[src]

Returns the phone_number_verified claim.

pub fn set_phone_number_verified(
    self,
    phone_number_verified: Option<bool>
) -> Self
[src]

Sets the phone_number_verified claim.

pub fn address(&self) -> Option<&AddressClaim>[src]

Returns the address claim.

pub fn set_address(self, address: Option<AddressClaim>) -> Self[src]

Sets the address claim.

pub fn updated_at(&self) -> Option<&DateTime<Utc>>[src]

Returns the updated_at claim.

pub fn set_updated_at(self, updated_at: Option<DateTime<Utc>>) -> Self[src]

Sets the updated_at claim.

pub fn additional_claims(&self) -> &AC[src]

Returns additional user info claims.

pub fn additional_claims_mut(&mut self) -> &mut AC[src]

Returns mutable additional user info claims.

Trait Implementations

impl<AC: Clone + AdditionalClaims, GC: Clone + GenderClaim> Clone for UserInfoClaims<AC, GC>[src]

impl<AC: Debug + AdditionalClaims, GC: Debug + GenderClaim> Debug for UserInfoClaims<AC, GC>[src]

impl<AC: AdditionalClaims, GC: GenderClaim> Serialize for UserInfoClaims<AC, GC> where
    AC: Serialize,
    GC: Serialize
[src]

Auto Trait Implementations

impl<AC, GC> Send for UserInfoClaims<AC, GC> where
    AC: Send,
    GC: Send

impl<AC, GC> Sync for UserInfoClaims<AC, GC> where
    AC: Sync,
    GC: Sync

impl<AC, GC> Unpin for UserInfoClaims<AC, GC> where
    AC: Unpin,
    GC: Unpin

impl<AC, GC> UnwindSafe for UserInfoClaims<AC, GC> where
    AC: UnwindSafe,
    GC: UnwindSafe

impl<AC, GC> RefUnwindSafe for UserInfoClaims<AC, GC> where
    AC: RefUnwindSafe,
    GC: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<T> Same<T> for T

type Output = T

Should always be Self