Bouncer.PasswordReset

A library of functions used to help with resetting user passwords.

Summary

Functions

Destroys a password reset token given the token and user ID. See Bouncer.Token.delete/2

Generates a password reset token. See Bouncer.Token.Generate/4

Removes any previous password reset tokens and generates a new one. See Bouncer.Token.regenerate/4

Verifies a password reset token is valid and matches the given user ID. See Bouncer.Token.Verify/3

Functions

destroy(token, id)

Destroys a password reset token given the token and user ID. See Bouncer.Token.delete/2.

generate(conn, user, ttl \\ 86400)

Generates a password reset token. See Bouncer.Token.Generate/4.

regenerate(conn, user, ttl \\ 86400)

Removes any previous password reset tokens and generates a new one. See Bouncer.Token.regenerate/4.

verify(conn, token)

Verifies a password reset token is valid and matches the given user ID. See Bouncer.Token.Verify/3.