pub struct ClientConfig { /* private fields */ }Expand description
Everything the client documents are derived from.
Fields are private and the only constructor is ClientConfig::new, so a
ClientConfig that exists has been validated. Leaving them public would
make the validation advisory, and the value it guards — client_id — is the
client’s identity rather than a request parameter.
Implementations§
Source§impl ClientConfig
impl ClientConfig
Sourcepub fn new(public_url: &str, scope: &str, dev: bool) -> Result<Self>
pub fn new(public_url: &str, scope: &str, dev: bool) -> Result<Self>
Build a validated config.
public_url must be an absolute http(s) URL with no path, and must
be https outside dev. The path rule is the one that bites: the sidecar
is mounted under /oauth, so SIDECAR_PUBLIC_URL is documented as
https://feather-reader.com/oauth — and reusing that value here would
produce …/oauth/oauth/client-metadata.json, which the edge proxy does
not route, 404ing a client_id the PDS has already cached.
Validated at construction rather than at use because client_id is the
client’s identity: a wrong one is not a bad request, it is a different
client, and it is discovered only after users cannot log in.
Auto Trait Implementations§
impl Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnsafeUnpin for ClientConfig
impl UnwindSafe for ClientConfig
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> 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