[][src]Struct actix_web_middleware_keycloak_auth::Claims

pub struct Claims {
    pub sub: Uuid,
    pub exp: DateTime<Utc>,
    pub realm_access: Option<Access>,
    pub resource_access: Option<HashMap<String, Access>>,
    pub iss: String,
    pub aud: Option<String>,
    pub iat: DateTime<Utc>,
    pub jti: Uuid,
    pub azp: String,
}

Claims that are extracted from JWT and can be accessed in handlers using a ReqData<Claims> parameter

Fields

sub: Uuid

Subject (usually, the user ID)

exp: DateTime<Utc>

Expiration date

realm_access: Option<Access>

Optional realm roles from Keycloak

resource_access: Option<HashMap<String, Access>>

Optional client roles from Keycloak

iss: String

Issuer

aud: Option<String>

Audience

iat: DateTime<Utc>

Issuance date

jti: Uuid

ID of the JWT

azp: String

Authorized party

Implementations

impl Claims[src]

pub fn roles(&self) -> Vec<Role>[src]

Extract Keycloak roles

Trait Implementations

impl Clone for Claims[src]

impl Debug for Claims[src]

impl Default for Claims[src]

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

impl Serialize for Claims[src]

Auto Trait Implementations

impl RefUnwindSafe for Claims

impl Send for Claims

impl Sync for Claims

impl Unpin for Claims

impl UnwindSafe for Claims

Blanket Implementations

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

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

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

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

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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<V, T> VZip<V> for T where
    V: MultiLane<T>,