Skip to content

Implement basic hashing #1

@Shadow53

Description

@Shadow53
  • Add necessary fields to the database
  • Create hashing functions (Argon2i)
    • Generate a random salt
    • Generate a hash, given a password, salt, and hashing parameters
    • Given resource maxima, determine the most secure hashing parameters
  • Create Warp `Filters
    • Create new user, given fields email, password, and confirm-password
      • If possible, disallow multiple accounts for the same email address by taking into account + suffixes on the email address, e.g. example+other@example.com
    • Get an Option<User> from a request using the Authorization header
    • Given the above Option<User>, respond to the client with a WWW-Authenticate header for paths where authentication is required (likely called like get_user().and(require_user))

Notes:

  • A User struct should not contain authentication-only information, i.e. hashing parameters, salt, or hash
  • All above functions, including Filters, must have unit tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttavern_serverThis issue or pull request relates to the tavern server binary

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions