mirror of
https://github.com/mainflux/mainflux.git
synced 2025-05-04 22:17:59 +08:00
16 lines
420 B
Go
16 lines
420 B
Go
![]() |
// Copyright (c) Mainflux
|
||
|
// SPDX-License-Identifier: Apache-2.0
|
||
|
|
||
|
package users
|
||
|
|
||
|
// Tokenizer specifies API for password reset token manipulation
|
||
|
type Tokenizer interface {
|
||
|
|
||
|
// Generate generate new random token. Offset can be used to
|
||
|
// manipulate token validity in time useful for testing.
|
||
|
Generate(email string, offset int) (string, error)
|
||
|
|
||
|
// Verify verifies token validity
|
||
|
Verify(tok string) (string, error)
|
||
|
}
|