Crate passport

Source
Expand description

passport-rs

A library for generating JWT passports following RFC-8225

Usage:

let passport_builder =
    passport::PassportBuilder::new(String::from("https://cert.example.org/passport.cer"), passport::Identity::URI(String::from("https://matrix.to/#/@alice:example.org")))
        .add_destination(passport::Identity::URI(String::from("https://matrix.to/#/@bob:example.org")))
        .set_expires_in(Some(512));

let jwt = passport_builder.encode(
    &passport::EncodingKey::from_secret(b"test_secret"),
    passport::Algorithm::HS512,
).unwrap();

Modules§

  • Structs for representing and parsing JWT data from configuration files

Structs§

Enums§

Functions§