Rusty Paseto

paseto JWT

rusty_paseto

examples/demo-rusty-paseto/Cargo.toml

[package]
name = "demo-rusty-paseto"
version = "0.1.0"
edition = "2024"

[dependencies]
rusty_paseto = "0.7.2"

examples/demo-rusty-paseto/src/main.rs

use rusty_paseto::prelude::*;

fn main() {

    // create a key specifying the PASETO version and purpose
    let key = PasetoSymmetricKey::<V4, Local>::from(Key::from(b"wubbalubbadubdubwubbalubbadubdub"));

    // use a default token builder with the same PASETO version and purpose
    let token = PasetoBuilder::<V4, Local>::default().build(&key).unwrap();
    println!("{token}");
}

Author

Gabor Szabo (szabgab)

Gabor Szabo, the author of the Rust Maven web site maintains several Open source projects in Rust and while he still feels he has tons of new things to learn about Rust he already offers training courses in Rust and still teaches Python, Perl, git, GitHub, GitLab, CI, and testing.

Gabor Szabo