blob: 6a266bdbce17ab2b2711e639253bbc70af386002 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
package totp
import (
"github.com/authelia/authelia/v4/internal/model"
)
// Provider for TOTP functionality.
type Provider interface {
Generate(ctx Context, username string) (config *model.TOTPConfiguration, err error)
GenerateCustom(ctx Context, username string, algorithm, secret string, digits uint32, period, secretSize uint) (config *model.TOTPConfiguration, err error)
Validate(ctx Context, token string, config *model.TOTPConfiguration) (valid bool, step uint64, err error)
Options() model.TOTPOptions
}
|