pub struct StepUpAuth(pub AuthClaims);Expand description
Extractor that requires a stepped-up session (acr == "aal2").
Use on sensitive operations that demand a second factor beyond the base did:key login:
ⓘ
async fn delete_did(auth: StepUpAuth, ...) { }A base (aal1) session is rejected with AppError::StepUpRequired
(403, body { "error": "step_up_required", "required_acr": "aal2" })
— a distinct signal the wallet uses to trigger a step-up ceremony,
rather than the generic forbidden it would get from a role gate.
Tuple Fields§
§0: AuthClaimsTrait Implementations§
Source§impl Clone for StepUpAuth
impl Clone for StepUpAuth
Source§fn clone(&self) -> StepUpAuth
fn clone(&self) -> StepUpAuth
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StepUpAuth
impl Debug for StepUpAuth
Source§impl<S> FromRequestParts<S> for StepUpAuthwhere
S: AuthState,
impl<S> FromRequestParts<S> for StepUpAuthwhere
S: AuthState,
Source§type Rejection = AppError
type Rejection = AppError
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response.
Source§async fn from_request_parts(
parts: &mut Parts,
state: &S,
) -> Result<StepUpAuth, <StepUpAuth as FromRequestParts<S>>::Rejection>
async fn from_request_parts( parts: &mut Parts, state: &S, ) -> Result<StepUpAuth, <StepUpAuth as FromRequestParts<S>>::Rejection>
Perform the extraction.
Auto Trait Implementations§
impl Freeze for StepUpAuth
impl RefUnwindSafe for StepUpAuth
impl Send for StepUpAuth
impl Sync for StepUpAuth
impl Unpin for StepUpAuth
impl UnsafeUnpin for StepUpAuth
impl UnwindSafe for StepUpAuth
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S, T> FromRequest<S, ViaParts> for T
impl<S, T> FromRequest<S, ViaParts> for T
Source§type Rejection = <T as FromRequestParts<S>>::Rejection
type Rejection = <T as FromRequestParts<S>>::Rejection
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response.
Source§fn from_request(
req: Request<Body>,
state: &S,
) -> impl Future<Output = Result<T, <T as FromRequest<S, ViaParts>>::Rejection>>
fn from_request( req: Request<Body>, state: &S, ) -> impl Future<Output = Result<T, <T as FromRequest<S, ViaParts>>::Rejection>>
Perform the extraction.