[][src]Struct orizentic::VerifiedToken

pub struct VerifiedToken {
    pub text: String,
    pub claims: ClaimSet,
}

An VerifiedToken is a combination of the JWT serialization and the decoded ClaimSet. This will only be created by the validate_function, and thus will represent a token which has been validated via signature, expiration time, and presence in the database.

Fields

text: Stringclaims: ClaimSet

Methods

impl VerifiedToken[src]

pub fn check_authorizations<F: FnOnce(&ResourceName, &Permissions) -> bool>(
    &self,
    f: F
) -> bool
[src]

Given a VerifiedToken, pass the resource name and permissions to a user-defined function. The function should return true if the caller should be granted access to the resource and false, otherwise. That result will be passed back to the caller.

Trait Implementations

impl Debug for VerifiedToken[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<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> 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]