pub enum ParError {
Show 14 variants
MissingParameter(&'static str),
UnsupportedResponseType,
UnsupportedResponseMode(String),
RedirectUriNotRegistered(String),
UnsupportedCodeChallengeMethod(String),
MalformedCodeChallenge,
TooLong {
field: &'static str,
max: usize,
},
BadScope(ScopeParseError),
ClientId(ClientIdError),
ClientMetadata(ClientMetadataError),
ClientAuthentication(ClientAuthError),
DpopKeyMismatch,
ClientRefused,
TooManyPending(DecisionRefused),
}Expand description
Why a pushed request could not be accepted.
Variants§
MissingParameter(&'static str)
A required OAuth parameter was absent.
UnsupportedResponseType
response_type named something other than code.
UnsupportedResponseMode(String)
response_mode named a mode this server does not answer in.
RedirectUriNotRegistered(String)
redirect_uri is not one the client’s own metadata declares.
UnsupportedCodeChallengeMethod(String)
code_challenge_method named something other than S256.
MalformedCodeChallenge
code_challenge is not 43 base64url characters, which every S256
challenge is.
TooLong
A parameter is longer than any value a client sends for it; see
MAX_STATE_BYTES and MAX_LOGIN_HINT_BYTES.
BadScope(ScopeParseError)
scope did not parse as the atproto scope grammar.
ClientId(ClientIdError)
client_id is not in the one spelling a policy matches; see
didbot_policy::ClientId.
ClientMetadata(ClientMetadataError)
The client’s metadata document could not be fetched or validated.
One sentence for every way that can happen, naming nothing the fetch
found. client_id is a URL this unauthenticated caller chose, so a
message that distinguished “nothing answered” from “it redirected”
from “the body was too large” would answer questions about this
deployment’s own network for whoever asked them — see
didbot_http::REFUSED_BLOCKS for the addresses
that are refused before the fetch. The cause this variant carries is
written to the journal instead; see crate::refusal.
ClientAuthentication(ClientAuthError)
The client did not authenticate the way its metadata says it does;
see crate::oauth::client_auth.
DpopKeyMismatch
dpop_jkt names a key other than the one the push’s DPoP proof was
signed with (RFC 9449 §10.1).
ClientRefused
plan/policy.md’s gate refuses every grant this client_id could
ever ask for here — a denyClient rule, or any rule shaped the same
way — independent of which account login_hint names.
didbot_policy::Subject::Grant carries no account field at all (see
didbot_pds::policy::grant_subject), so this judgment is a fact
about the client and the requested scope alone; checking it before
login_hint is even resolved changes nothing it could answer.
Refused here, before a decision record exists, and the same way for
every login_hint alike — a real account, an account this gate
would otherwise grant, or one nobody has ever heard of, since the
judgment is made before any of them is looked at. That is what keeps
this refusal from being a second account-enumeration oracle beside
the one push_authorization_request’s own doc closes: it fires on
client_id and requested scope alone, so no login_hint value can
change which way it comes out. A grant this deployment would make
still gets the ordinary opaque-decision-record treatment
(plan/oauth.md’s “a pushed request is a decision record”) — only a
client this gate refuses unconditionally skips minting one, because
there is nothing an account could approve.
TooManyPending(DecisionRefused)
This server already holds as many undecided records as it will at
once — server load, not a fact about any account, so it is safe to
answer identically to every caller. Only ever built from
DecisionRefused::TooMany: an account’s own bound overflowing is
answered as a plain success instead, never as this — see
push_authorization_request’s own doc for why.
Trait Implementations§
Source§impl Error for ParError
impl Error for ParError
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()
Source§impl From<ClientAuthError> for ParError
impl From<ClientAuthError> for ParError
Source§fn from(source: ClientAuthError) -> Self
fn from(source: ClientAuthError) -> Self
Source§impl From<ClientIdError> for ParError
impl From<ClientIdError> for ParError
Source§fn from(source: ClientIdError) -> Self
fn from(source: ClientIdError) -> Self
Source§impl From<ClientMetadataError> for ParError
impl From<ClientMetadataError> for ParError
Source§fn from(source: ClientMetadataError) -> Self
fn from(source: ClientMetadataError) -> Self
Source§impl From<DecisionRefused> for ParError
impl From<DecisionRefused> for ParError
Source§fn from(source: DecisionRefused) -> Self
fn from(source: DecisionRefused) -> Self
Source§impl From<ScopeParseError> for ParError
impl From<ScopeParseError> for ParError
Source§fn from(source: ScopeParseError) -> Self
fn from(source: ScopeParseError) -> Self
impl Eq for ParError
impl StructuralPartialEq for ParError
Auto Trait Implementations§
impl Freeze for ParError
impl RefUnwindSafe for ParError
impl Send for ParError
impl Sync for ParError
impl Unpin for ParError
impl UnsafeUnpin for ParError
impl UnwindSafe for ParError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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