[][src]Struct oxide_auth::primitives::generator::Assertion

pub struct Assertion { /* fields omitted */ }

Generates tokens by signing its specifics with a private key.

Tokens produced by the generator include a serialized version of the grant followed by an HMAC signature. Since data is not encrypted, this token generator will ERROR if any private extension is present in the grant.

The actual generator is given by a TaggedAssertion from Assertion::tag which enables signing the same grant for different uses, i.e. separating authorization from bearer grants and refresh tokens.

Methods

impl Assertion[src]

pub fn new<S: Into<Self>>(secret: S) -> Self[src]

Construct an assertion from one of the possible secrets.

Conversion is done via the Into trait so that new secrets can be added in a backwards compatible way while outdated secrets can be removed with as few breakage as possible. This will hopefully allow us to partially transition to an upgraded version of ring at some point in the nearer future.

pub fn ephermal() -> Assertion[src]

Construct an assertion instance whose tokens are only valid for the program execution.

pub fn tag<'a>(&'a self, tag: &'a str) -> TaggedAssertion<'a>[src]

Get a reference to generator for the given tag.

Trait Implementations

impl TagGrant for Assertion[src]

impl<'a> TagGrant for &'a Assertion[src]

impl From<SigningKey> for Assertion[src]

fn from(secret: SigningKey) -> Self[src]

Convert to an Assertion from a secret signing key.

Auto Trait Implementations

impl Send for Assertion

impl Sync for Assertion

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> Erased for T

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<T> UnsafeAny for T where
    T: Any

impl<T> IntoCollection<T> for T

impl<T, I> AsResult<T, I> for T where
    I: Input,