2021-12-01 12:11:29 +00:00
|
|
|
package totp
|
|
|
|
|
|
|
|
import (
|
2022-03-06 05:47:40 +00:00
|
|
|
"github.com/authelia/authelia/v4/internal/model"
|
2021-12-01 12:11:29 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Provider for TOTP functionality.
|
|
|
|
type Provider interface {
|
2022-03-06 05:47:40 +00:00
|
|
|
Generate(username string) (config *model.TOTPConfiguration, err error)
|
2022-04-07 23:01:01 +00:00
|
|
|
GenerateCustom(username string, algorithm, secret string, digits, period, secretSize uint) (config *model.TOTPConfiguration, err error)
|
2022-03-06 05:47:40 +00:00
|
|
|
Validate(token string, config *model.TOTPConfiguration) (valid bool, err error)
|
2023-02-13 20:39:46 +00:00
|
|
|
Options() model.TOTPOptions
|
2021-12-01 12:11:29 +00:00
|
|
|
}
|