6 releases
0.4.0 | Mar 7, 2022 |
---|---|
0.3.4 | Apr 23, 2021 |
0.3.2 | Mar 24, 2021 |
0.1.0 |
|
#471 in Authentication
18KB
263 lines
PASSporT: Personal Assertion Token
Coverage | Pipeline |
---|---|
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
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
~260K SLoC