#rocket #system #cookies #key #config #username-password

rocket-simpleauth

Simple username/password authentication system for Rocket

5 releases (3 breaking)

Uses old Rust 2015

0.4.0 Mar 14, 2018
0.3.0 Jul 29, 2017
0.2.0 Jul 25, 2017
0.1.1 Jun 28, 2017
0.1.0 Feb 13, 2017

#79 in #cookies

45 downloads per month

LGPL-3.0

9KB
137 lines

Auth-rs

This library provides a simple username/password authentication system to use with Rocket.

For Cookie encryption, the library uses the Private Cookie feature of Rocket. For maintaining cookie validity after a restart, do not forget to set the secret_key configuration parameter, otherwise Rocket will generate a new key at every execution.

Cargo.toml

[dependencies]
rocket = "0.3.0"
rocket-simpleauth = "0.4.0"
rocket_codegen = "0.3.0"

Example

Please check example/ directory, for a full example.

API Stability

Apart from a few functions of some traits, the API should stay the same from now on (v0.4.0). Given issue #6 it is probabel that the Authenticator trait will change.

When this crate reaches 1.0.0, the full API will be considered stable and frozen.

Todo

The following items are in development or are planned to be developped:

  • standard implementation for user storage into sqlite databases
  • publishing to crates.io
  • Documentation

On hold

See this issue

  • cookie storage in Redis datastore
  • stateless cookie validation using JSON Web Tokens

Dependencies

~11–19MB
~371K SLoC