pub struct JwtAuthBuilder<'a> { /* private fields */ }Expand description
Builder for JWT test authentication.
Created by AuthBuilder::jwt().
Implementations§
Source§impl<'a> JwtAuthBuilder<'a>
impl<'a> JwtAuthBuilder<'a>
Sourcepub fn with_secondary(self, auth: impl SecondaryAuth + 'static) -> Self
pub fn with_secondary(self, auth: impl SecondaryAuth + 'static) -> Self
Add a custom secondary auth layer.
Sourcepub async fn apply(self) -> Result<(), TestAuthError>
pub async fn apply(self) -> Result<(), TestAuthError>
Apply JWT authentication to the client.
Signs a JWT with the configured secret and sets the Authorization: Bearer header.
Auto Trait Implementations§
impl<'a> Freeze for JwtAuthBuilder<'a>
impl<'a> !RefUnwindSafe for JwtAuthBuilder<'a>
impl<'a> Send for JwtAuthBuilder<'a>
impl<'a> Sync for JwtAuthBuilder<'a>
impl<'a> Unpin for JwtAuthBuilder<'a>
impl<'a> UnsafeUnpin for JwtAuthBuilder<'a>
impl<'a> !UnwindSafe for JwtAuthBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more