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

#351 in Authentication

Download history 21/week @ 2024-02-26 83/week @ 2024-04-01

83 downloads per month

AGPL-3.0-only

18KB
263 lines

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


lib.rs:

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

Dependencies

~6.5–9MB
~256K SLoC