#[non_exhaustive]pub enum StepUpFailure {
NotReported,
Stale,
AcrNotMet,
}consent only.Expand description
Why a host’s reported authentication did not satisfy an AuthenticationRequirement.
Fieldless on purpose, and not only for the size of it. The error_description these produce goes
back to the CLIENT through the authorization response redirect (RFC 6749 section 4.1.2.1), and
the client is not entitled to learn when the user last logged in or which acr they hold; “not
fresh enough” is the whole of what it needs in order to decide to ask again.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotReported
The host reported no authentication at all, and the request asked about one.
Stale
The authentication is older than the request’s max_age.
AcrNotMet
The reported acr is not one of the requested acr_values (or none was reported).
Implementations§
Source§impl StepUpFailure
impl StepUpFailure
Sourcepub fn description(self) -> &'static str
pub fn description(self) -> &'static str
The developer-facing description this failure carries onto the wire.
&'static str, so a refusal allocates nothing for it. The authorization endpoint is a path
whose rate an unauthenticated caller sets, and an allocation per refusal there is a cost an
attacker chooses.
Sourcepub fn error_response(self) -> ErrorResponse
pub fn error_response(self) -> ErrorResponse
The RFC 9470 section 3 error this failure is reported as.
insufficient_user_authentication is registered by RFC 9470 for the RESOURCE server’s
challenge, and section 4 names no code for the authorization server’s own refusal. This crate
uses the same one, deliberately, because it is the code the client has just been handed by
the resource server and re-sending it says exactly the true thing: the authentication is
still not sufficient. The alternative, a bare invalid_request, tells a client its
parameters were malformed and invites it to retry the identical request.
Trait Implementations§
Source§impl Clone for StepUpFailure
impl Clone for StepUpFailure
Source§fn clone(&self) -> StepUpFailure
fn clone(&self) -> StepUpFailure
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for StepUpFailure
Source§impl Debug for StepUpFailure
impl Debug for StepUpFailure
Source§impl Display for StepUpFailure
impl Display for StepUpFailure
impl Eq for StepUpFailure
Source§impl Error for StepUpFailure
The other error-shaped types in this crate (crate::dpop::DpopFailure,
crate::client_assertion::AssertionFailure, crate::mtls::MtlsRegistrationError) are all
std::error::Error, and a host that puts one of them behind ? or in a Box<dyn Error> has to
be able to do the same with this one. Display above is the whole implementation.
impl Error for StepUpFailure
The other error-shaped types in this crate (crate::dpop::DpopFailure,
crate::client_assertion::AssertionFailure, crate::mtls::MtlsRegistrationError) are all
std::error::Error, and a host that puts one of them behind ? or in a Box<dyn Error> has to
be able to do the same with this one. Display above is the whole implementation.
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()