medallion/README.md

17 lines
1.2 KiB
Markdown
Raw Normal View History

2017-02-15 20:46:23 +00:00
# Medallion [![Build Status](https://travis-ci.org/commandline/medallion.svg?branch=master)](https://travis-ci.org/commandline/medallion)
2017-02-17 16:29:57 +00:00
[![Crates.io Status](http://meritbadge.herokuapp.com/medallion)](https://crates.io/crates/medallion)
[![Documentation](https://docs.rs/medallion/badge.svg)](https://docs.rs/medallion)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/commandline/medallion/master/LICENSE)
2017-02-13 23:40:07 +00:00
A JWT library for rust using serde, serde_json and openssl.
2017-02-15 20:42:06 +00:00
## Documentation
2017-02-15 20:46:23 +00:00
- [Documentation] (https://commandline.github.io/medallion/)
2017-02-15 20:42:06 +00:00
2017-02-13 23:40:07 +00:00
## Usage
2017-02-17 16:30:19 +00:00
The library provides a `Token` type that wraps a header and claims. The claims can be any type that implements the `Component` trait, which is automatically implemented for types that implement the `Sized`, and must have the attribute `#[derive(Serialize, Deserialize)`. Header can be any type that implements `Component` and `Header`. `Header` ensures that the required algorithm is available for signing and verification. `HS256`, `HS384`, `HS512`, `RS256`, `RS384`, and `RS512` are supported. See the examples.
2017-02-13 23:40:07 +00:00
This library was originally forked from @mikkyang's rust-jwt.