Skip to main content

prove_by_oidc

Function prove_by_oidc 

Source
pub(super) async fn prove_by_oidc(
    state: &AppState,
    token: &str,
    iss: &str,
    did: &str,
    now: OffsetDateTime,
) -> Result<Proof, ApiError>
Expand description

Verifies an OpenID Connect ID token against its issuer’s keys, and against the identities of did, the account the request named. One of that account’s identities at the token’s issuer matching is enough.

Nothing is fetched until the account is hosted here and logs in with an identity at the token’s issuer: anyone may present a token, and nothing is read from a stranger’s issuer.