auth_for_warp

Crates.ioauth_for_warp
lib.rsauth_for_warp
version0.1.1
sourcesrc
created_at2022-05-24 17:18:53.309921
updated_at2022-05-25 12:57:23.390079
descriptionplugin auth module for warp-based servers
homepage
repositoryhttps://github.com/swiftcoder/auth_for_warp/
max_upload_size
id592944
size61,900
Tristam MacDonald (swiftcoder)

documentation

README

Action Status Crates.io Docs.rs

auth_for_warp

A proof-of-concept for a simple and reusable auth module that can be plugged into any warp-based server application.

Passwords are salted and hashed using argon2. On successful login, a JSON Web Token is generated using jsonwebtoken and returned to the client. A warp filter is provided to authenticate subsequent requests against that token via bearer authentication.

Some limitiations (certainly not an exhaustive list):

  • TLS is necessary to avoid leaking passwords on the wire (no PAKE).
  • Only supports username + password (no OAuth, no TOTP, etc).
  • All credential storage is left up to the application.
  • User ID allocation probably ought to be left up to the application.
  • Only handles authentication, supporting authorization will need some design work.
Commit count: 7

cargo fmt