Skip to main content

resolve_client

Function resolve_client 

Source
pub async fn resolve_client(
    pool: &PgPool,
    client_id: &str,
    user_id: Uuid,
) -> Result<OAuthClient, ControllerError>
Expand description

The client registration for a metadata document client_id, fetched and cached as needed. user_id is the signed-in user the fetch is made for: fetching a document that was never fetched before counts against their hourly quota.

No pooled connection is held while the document is fetched. A cached copy older than the cache lifetime but still usable is returned at once and refreshed in the background.