pub enum CallbackError {
StateMismatch,
Issuer(AuthorizationResponseError),
Refused {
error: Arc<str>,
},
NoOutcome,
}Expand description
Why an authorization callback was refused.
Variants§
StateMismatch
The state did not match, or was absent.
RFC 6749 §4.1.2 requires the client validate state. A mismatch means
this response is not the answer to the request this client made, which
covers a forged redirect, a stale tab, and a callback for a different
flow. The two are not distinguished: an attacker learns nothing useful
from which, and a client that reported them separately would leak the
presence of an outstanding flow.
Issuer(AuthorizationResponseError)
The response named a different authorization server.
Refused
The authorization server refused.
Carries the RFC 6749 §4.1.2.1 error code. This is the server saying no
— access_denied, invalid_scope, a user’s “no” at the consent screen —
and is deliberately not folded into a generic failure, because a client
showing the user “access denied” is doing the right thing.
NoOutcome
Neither a code nor an error.
A well-formed response carries exactly one. This is a server sending something this crate cannot interpret, which is not the same as a refusal and not the same as success.
Trait Implementations§
Source§impl Clone for CallbackError
impl Clone for CallbackError
Source§impl Debug for CallbackError
impl Debug for CallbackError
Source§impl Display for CallbackError
impl Display for CallbackError
impl Eq for CallbackError
Source§impl Error for CallbackError
impl Error for CallbackError
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()