[−][src]Struct oxide_auth::primitives::generator::Assertion
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
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
A: Array<Item = T>,
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T, I> AsResult<T, I> for T where
I: Input,
I: Input,