change password func + tests

This commit is contained in:
tsmethurst 2021-10-12 17:06:49 +02:00
commit fd0fc31ac3
4 changed files with 178 additions and 1 deletions

View file

@ -29,7 +29,8 @@ import (
// Processor wraps a bunch of functions for processing user-level actions.
type Processor interface {
// ChangePassword changes the specified user's password from old => new, or returns an error.
// ChangePassword changes the specified user's password from old => new,
// or returns an error if the new password is too weak, or the old password is incorrect.
ChangePassword(ctx context.Context, user *gtsmodel.User, oldPassword string, newPassword string) gtserror.WithCode
}