pub enum ClientMetadataError {
Show 21 variants
NotHttps(String),
HasFragment(String),
HasPort(String),
Fetch(String, String),
Malformed(String, String),
ClientIdMismatch {
fetched_from: String,
claimed: String,
},
NoRedirectUris(String),
BadRedirectUri(String),
BadNativeRedirectUri(String),
Redirected {
client_id: String,
to: String,
},
NotOk {
client_id: String,
status: StatusCode,
},
NotJson {
client_id: String,
content_type: String,
},
TooLarge(String),
NotDpopBound(String),
UnsupportedAuthMethod(String),
UnsupportedSigningAlg(String),
NoClientKeys(String),
TwoKeySets(String),
BadJwksUri(String),
LoopbackRedirectUri(String),
RefusedAddress(String),
}Expand description
Why a client metadata document could not be used.
Variants§
NotHttps(String)
client_id is not an https:// URL (loopback http:// is the one
exception, for development, mirroring didbot_identity’s own
loopback carve-out for did:web).
HasFragment(String)
client_id has a fragment, which the spec forbids — a fragment is
never sent to a server, so two client IDs differing only in one would
be indistinguishable to anyone fetching them.
HasPort(String)
client_id names a port, which the profile forbids outside its
http://localhost form.
Fetch(String, String)
The document could not be fetched at all.
Malformed(String, String)
The document did not parse as the expected shape.
ClientIdMismatch
The document’s own client_id did not equal the URL it was served
from — the binding the whole scheme depends on.
Fields
NoRedirectUris(String)
No redirect_uris, or every one of them is unusable.
BadRedirectUri(String)
A web client’s redirect_uris entry is not https://, or carries a
fragment.
BadNativeRedirectUri(String)
A native client’s redirect_uris entry breaks the profile’s rules for
native clients; see is_native_redirect_uri (this module, private).
Redirected
The fetch did not stay at client_id.
A client metadata document is its client_id: the URL is the
registration. A redirect means the document was served by something
other than the identifier it claims, and nothing downstream re-checks
where it actually landed — validate compares the document against
the requested client_id, so an open redirect at an otherwise
well-behaved client_id host would let a third party supply that
host’s registration. Refused rather than capped for that reason.
Fields
NotOk
The fetch was answered with a status other than 200 OK, which the
profile requires (“not another 2xx or a redirect”).
Fields
status: StatusCodeWhat the fetch was answered with.
NotJson
The document was not served as application/json, which the profile
requires.
Fields
TooLarge(String)
The document is larger than MAX_DOCUMENT_BYTES.
NotDpopBound(String)
dpop_bound_access_tokens was absent or false.
UnsupportedAuthMethod(String)
token_endpoint_auth_method is neither none nor private_key_jwt.
UnsupportedSigningAlg(String)
token_endpoint_auth_signing_alg is none, or a confidential client
names no algorithm this server verifies.
NoClientKeys(String)
A confidential client publishes no key a client assertion can be checked against.
TwoKeySets(String)
A confidential client names both jwks and jwks_uri, which the
atproto profile forbids.
BadJwksUri(String)
jwks_uri is not https:// (or loopback http:// on a deployment
that fetches from its own machine), or carries a fragment.
LoopbackRedirectUri(String)
A loopback client_id’s redirect_uri query parameter named a host
other than 127.0.0.1 or [::1] — the atproto profile’s “Localhost
Client Development” form allows any port on either, and nothing
else, including localhost itself.
RefusedAddress(String)
client_id’s host is, or resolves to, an address outside
didbot_http::REFUSED_BLOCKS — this deployment’s own network
rather than the public internet.
Trait Implementations§
Source§impl Clone for ClientMetadataError
impl Clone for ClientMetadataError
Source§fn clone(&self) -> ClientMetadataError
fn clone(&self) -> ClientMetadataError
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 ClientMetadataError
impl Debug for ClientMetadataError
Source§impl Display for ClientMetadataError
impl Display for ClientMetadataError
Source§impl Error for ClientMetadataError
impl Error for ClientMetadataError
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()
Source§impl From<ClientMetadataError> for ParError
impl From<ClientMetadataError> for ParError
Source§fn from(source: ClientMetadataError) -> Self
fn from(source: ClientMetadataError) -> Self
Source§impl PartialEq for ClientMetadataError
impl PartialEq for ClientMetadataError
Source§fn eq(&self, other: &ClientMetadataError) -> bool
fn eq(&self, other: &ClientMetadataError) -> bool
self and other values to be equal, and is used by ==.impl Eq for ClientMetadataError
impl StructuralPartialEq for ClientMetadataError
Auto Trait Implementations§
impl Freeze for ClientMetadataError
impl RefUnwindSafe for ClientMetadataError
impl Send for ClientMetadataError
impl Sync for ClientMetadataError
impl Unpin for ClientMetadataError
impl UnsafeUnpin for ClientMetadataError
impl UnwindSafe for ClientMetadataError
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