authelia/internal/totp/provider.go
2022-03-06 16:47:40 +11:00

13 lines
422 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 string, digits, period, secretSize uint) (config *model.TOTPConfiguration, err error)
Validate(token string, config *model.TOTPConfiguration) (valid bool, err error)
}