pub struct ClientStore { /* private fields */ }Expand description
In-memory store of registered clients.
find_by_id is used by the /auth and /token endpoints. When
the id looks like a URL and isn’t known, the store will attempt
to fetch a Client Identifier Document (SSRF-guarded) and cache
the result for CLIENT_CACHE_TTL.
Implementations§
Source§impl ClientStore
impl ClientStore
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct a store with the default reqwest HTTP client. Use
ClientStore::with_http to supply a custom client (timeout,
proxy, rustls roots, etc.).
Sourcepub fn with_http(self, client: HttpClient) -> Self
pub fn with_http(self, client: HttpClient) -> Self
Use a caller-supplied HTTP client (e.g. with custom SSRF-aware transport).
Sourcepub fn insert(&self, client: ClientDocument)
pub fn insert(&self, client: ClientDocument)
Explicitly insert a registered client (test / boot-time).
Trait Implementations§
Source§impl Clone for ClientStore
impl Clone for ClientStore
Source§fn clone(&self) -> ClientStore
fn clone(&self) -> ClientStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ClientStore
impl !RefUnwindSafe for ClientStore
impl Send for ClientStore
impl Sync for ClientStore
impl Unpin for ClientStore
impl UnsafeUnpin for ClientStore
impl !UnwindSafe for ClientStore
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
Mutably borrows from an owned value. Read more