pub struct StepUpAuth(pub AuthClaims);Expand description
Extractor that requires a stepped-up session (JWT acr == "aal2").
Use on routes that demand a second factor beyond the base DID
challenge-response (aal1) — typical examples: ACL edits,
key rotation, backup export, anything that lets an attacker
with a leaked aal1 token pivot to a long-lived foothold.
async fn rotate_keys(auth: StepUpAuth, ...) { /* aal2 enforced */ }A request with a lower acr is rejected with
AppError::StepUpRequired (403 + body
{ "error": "step_up_required", "requiredAcr": "aal2" }). The
wallet uses that signal to trigger a passkey-login or
VTA-approval ceremony — distinct from a generic forbidden
it would get from a role gate.
Trust model: the gate reads acr from the JWT claims the
AuthClaims extractor already verified (signature, expiry,
session existence). Step-up tokens are stateless during their
access-window; the canonical refresh handler preserves acr
across rotation. If a step-up access-token leaks, the only
brake is the short access-token TTL (or [M2] — shorter TTL
when acr=aal2).
Tuple Fields§
§0: AuthClaimsTrait Implementations§
Source§impl Clone for StepUpAuth
impl Clone for StepUpAuth
Source§fn clone(&self) -> StepUpAuth
fn clone(&self) -> StepUpAuth
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StepUpAuth
impl Debug for StepUpAuth
Source§impl<S: AuthState> FromRequestParts<S> for StepUpAuth
impl<S: AuthState> FromRequestParts<S> for StepUpAuth
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
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
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
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>>
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, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ResourceProvider<()> for T
impl<T> ResourceProvider<()> for T
Source§fn get_resource(&self) -> &()
fn get_resource(&self) -> &()
T.