6 releases

0.4.0 Mar 7, 2022
0.3.4 Apr 23, 2021
0.3.2 Mar 24, 2021
0.1.0 May 8, 2019

#864 in Authentication

Download history 20/week @ 2024-12-09 17/week @ 2025-02-17 1/week @ 2025-02-24

128 downloads per month

AGPL-3.0-only

18KB
263 lines

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();

PASSporT: Personal Assertion Token

Coverage Pipeline
coverage report pipeline status

This crate implements RFC8225's Personal Assertion Tokens, for cryptographically establishing trust between originating and destination parties of personal communication.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

AGPL-3.0-only

Dependencies

~6.5–9.5MB
~261K SLoC