Crates.io | rocket-auth-token |
lib.rs | rocket-auth-token |
version | 0.1.1 |
source | src |
created_at | 2021-11-28 18:32:39.265441 |
updated_at | 2021-11-28 18:38:52.597158 |
description | Auth token and credentials helper for your rocket web api. This is a basic token generator plugin for Rust Rocket Web. |
homepage | https://github.com/Samuelonoja/rocket-auth-token/ |
repository | https://github.com/Samuelonoja/rocket-auth-token/ |
max_upload_size | |
id | 488916 |
size | 5,508 |
Auth token and credentials helper for your rocket web api.
This is a basic token generator crate for Rust Rocket Web.
let credentials = AuthCredentials{email: "email", password: "password"}, use hasher(credentials) function to generate and send AuthToken to user on login.
user then need to supply the generated token as auth header when making request to server. Using rocket request guard, grab the auth token and decode with decode_hasher function.