Skip to main content

public_key_for

Function public_key_for 

Source
pub async fn public_key_for(user_id: Uuid) -> Result<Option<String>, DBError>
Expand description

Fetches a user’s base64-PEM public verification key from the global users directory. Used on the token VERIFY path, looked up by the (still-unverified) sub claim — so the right key is fetched before the per-user DB is reachable. Returns None if the user is unknown or has no key.

§Errors

DBError::Sqlx on a DB error.