8000 GitHub - noaione/jwt-lc-rs: Simple library to generate JWT using FIPS-compatible crypto backend
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

noaione/jwt-lc-rs

Repository files navigation

jwt-lc-rs

A simple library for generating and verifying JWTs using aws-lc-rs

This library does not implement the JWS specifications from the RFCs.

Supported algorithms

  • HS256
  • HS384
  • HS512
  • RS256
  • RS384
  • RS512
  • PS256
  • PS384
  • PS512
  • ES256
  • ES384
  • ES512
  • ES256K (ECDSA P-256K1/secp256k1)
  • EdDSA (Ed25519)

Supported native validations

Header:

  • typ (Type), always check it is set to "JWT" (case-sensitive)
  • alg (Algorithm), verify that the requested algorithm is what you expect.

Claims/body:

  • iss (Issuer)
  • sub (Subject)
  • aud (Audience)
  • exp (Expiry)
  • nbf (Not before)
  • Any other custom validation can be implemented using the Validator trait

Note: While we don't provide validation for jti and iat, you can implement it using the Validator trait.

Examples

See the tests for examples.

License

This project is dual-licensed under the Apache-2.0 and MIT licenses at your convenience.

MSRV policy

The current minimum supported Rust version is 1.81.0

This will be bumped periodically as we support newer versions of Rust.

Acknowledgements

  • jsonwebtoken by Keats
    • Main inspiration and reference
    • Took some code related to ClaimsForValidation and some of the pem handling.

About

Simple library to generate JWT using FIPS-compatible crypto backend

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0