#rocket-web #web-api #rocket #token #api-token #web #api

rocket-auth-token

Auth token and credentials helper for your rocket web api. This is a basic token generator plugin for Rust Rocket Web.

1 unstable release

0.1.1 Nov 28, 2021
0.1.0 Nov 28, 2021

#46 in #api-token

MIT/Apache

6KB
50 lines

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.

Dependencies

~0.6–1.2MB
~27K SLoC