[][src]Struct oidc::token::Claims

pub struct Claims {
    pub iss: Url,
    pub sub: String,
    pub aud: SingleOrMultiple<String>,
    pub exp: i64,
    pub iat: i64,
    pub auth_time: Option<i64>,
    pub nonce: Option<String>,
    pub acr: Option<String>,
    pub amr: Option<Vec<String>>,
    pub azp: Option<String>,
    // some fields omitted
}

ID Token contents. See spec.

Fields

iss: Urlsub: Stringaud: SingleOrMultiple<String>exp: i64iat: i64auth_time: Option<i64>nonce: Option<String>acr: Option<String>amr: Option<Vec<String>>azp: Option<String>

Methods

impl Claims[src]

pub fn at_hash(&self) -> Option<Vec<u8>>[src]

Decodes at_hash. Returns None if it doesn't exist or something goes wrong.

See spec 3.1.3.6

The returned Vec is the first 128 bits of the access token hash using alg's hash alg

Trait Implementations

impl Serialize for Claims[src]

impl<'de> Deserialize<'de> for Claims[src]

impl CompactJson for Claims[src]

Auto Trait Implementations

impl Send for Claims

impl Unpin for Claims

impl Sync for Claims

impl UnwindSafe for Claims

impl RefUnwindSafe for Claims

Blanket Implementations

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

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

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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> CompactPart for T where
    T: CompactJson
[src]

fn to_bytes(&self) -> Result<Vec<u8>, Error>[src]

JSON serialize the part and return the JSON string bytes

impl<T> Erased for T

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

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