Frank JWT
Implementation of JSON Web Tokens in Rust.
Algorithms and features supported
- HS256
- HS384
- HS512
- RS256
- RS384
- RS512
- ES256
- ES384
- ES512
- Sign
- Verify
- iss (issuer) check
- sub (subject) check
- aud (audience) check
- exp (expiration time) check
- nbf (not before time) check
- iat (issued at) check
- jti (JWT id) check
Usage
Put this into your Cargo.toml
:
[]
= "<current version of frank_jwt>"
And this in your crate root:
extern crate frank_jwt;
extern crate serde_json;
use ;
Example
//HS256
let mut payload = json!;
let mut header = json!;
let secret = "secret123";
let jwt = encode;
//RS256
use env;
let mut payload = json!;
let mut header = json!;
let mut keypath = current_dir.unwrap;
keypath.push;
keypath.push;
let jwt = encode;
let = decode;
License
Apache 2.0
Tests
cargo test
I'm available for hire
I'm a freelance developer and looking forward to new challenges.
me@gildedhonour.com | gildedhonour.com
Contributors
todo