mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
9b6bcca1ba
Allow customizing the shared secrets size specifically for apps which don't support 256bit shared secrets.
13 lines
430 B
Go
13 lines
430 B
Go
package totp
|
|
|
|
import (
|
|
"github.com/authelia/authelia/v4/internal/model"
|
|
)
|
|
|
|
// Provider for TOTP functionality.
|
|
type Provider interface {
|
|
Generate(username string) (config *model.TOTPConfiguration, err error)
|
|
GenerateCustom(username string, algorithm, secret string, digits, period, secretSize uint) (config *model.TOTPConfiguration, err error)
|
|
Validate(token string, config *model.TOTPConfiguration) (valid bool, err error)
|
|
}
|