Function github_oidc::fetch_jwks

source ·
pub async fn fetch_jwks(oidc_url: &str) -> Result<GithubJWKS>
Expand description

Fetches the JSON Web Key Set (JWKS) from the specified OIDC URL.

This function is used to retrieve the set of public keys that GitHub uses to sign its JSON Web Tokens (JWTs).

§Arguments

  • oidc_url - The base URL of the OpenID Connect provider (GitHub in this case)

§Returns

  • Result<GithubJWKS> - A Result containing the fetched JWKS if successful, or an error if the fetch or parsing fails

§Example

let jwks = fetch_jwks(your_oidc_url).await?;