Expand description

A helper library for working with JWT’s for Okta.

The purpose of this library is to help with the verification of access and ID tokens issued by Okta. See Verifier for more examples, and a tide middleware implementation in the repository under the examples directory.

Minimal example

use okta_jwt_verifier::{Verifier, DefaultClaims};

#[async_std::main]
async fn main() -> anyhow::Result<()> {
    let token = "token";
    let issuer = "https://your.domain/oauth2/default";

    Verifier::new(&issuer)
        .await?
        .verify::<DefaultClaims>(&token)
        .await?;
    Ok(())
}

Structs

  • Describes optional config when creating a new Verifier
  • Describes the default claims inside a decoded token
  • Attempts to retrieve the keys from an Okta issuer, decode and verify a given access/ID token, and deserialize the requested claims.