#jwt #json #jws #api

cjwt

A Rust library for working with JSON Web Tokens (JWTs) and JSON Web Signatures (JWSs)

1 unstable release

0.0.1 Feb 7, 2023

#13 in #json-web-token

36 downloads per month
Used in 2 crates

MIT/Apache

72KB
652 lines

CJWT

A Rust library for working with JSON Web Tokens (JWTs) and JSON Web Signatures (JWSs)

Made With Love Crates.io Lib.rs Docs.rs License

divider

Welcome to CJWT 👋

CJWT Banner

Website â€ĸ Documentation â€ĸ Report Bug â€ĸ Request Feature â€ĸ Contributing Guidelines

Overview 📖

The Core JWT (CJWT) is a struct with a JWT token and claims. It has functions for working with JSON Web Tokens (JWTs) and JSON Web Signatures (JWSs). JWTs have three parts: a header, a payload, and a signature. The header and payload are JSON objects. They're serialized to UTF-8 bytes and encoded with base64url encoding.

Features ✨

  • JWT token generation
  • JWT token validation
  • JWT token signing

Installation đŸ“Ļ

It takes just a few minutes to get up and running with cjwt.

Requirements

cjwt requires Rust 1.67.0 or later.

Documentation

ℹī¸ Info: Please check out our website for more information and find our documentation on docs.rs, lib.rs and crates.io.

Usage 📖

To use cjwt in your project, add the following to your Cargo.toml file:

[dependencies]
cjwt = "0.0.1"

Add the following to your main.rs file:

extern crate cjwt;
use cjwt::*;

then you can use the functions in your application code.

Examples

CJWT comes with a set of examples that you can use to get started. The examples are located in the examples directory of the project. To run the examples, clone the repository and run the following command in your terminal from the project root directory.

cargo run --example cjwt

Semantic Versioning Policy đŸšĨ

For transparency into our release cycle and in striving to maintain backward compatibility, QRC follows semantic versioning.

License 📝

The project is licensed under the terms of both the MIT license and the Apache License (Version 2.0).

Contribution 🤝

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

divider

Acknowledgements 💙

A big thank you to all the awesome contributors of Mini Functions for their help and support. A special thank you goes to the Rust Reddit community for providing a lot of useful suggestions on how to improve this project. A special thank you goes to the Rust Reddit community for providing a lot of useful suggestions on how to improve this project.

Dependencies

~10–13MB
~335K SLoC