Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidConfig = errors.New("invalid config")
ErrInvalidConfig signals that an invalid configuration was provided
View Source
var ErrNilOTPProvider = errors.New("nil otp provider")
ErrNilOTPProvider signals that a nil otp provider was provided
View Source
var ErrNilRateLimiter = errors.New("nil rate limiter")
ErrNilRateLimiter signals that a nil rate limiter was provided
View Source
var ErrRegistrationFailed = errors.New("registration failed")
ErrRegistrationFailed signals that registration failed
Functions ¶
This section is empty.
Types ¶
type OTP ¶
type OTP interface { Validate(userCode string) error OTP() (string, error) QR() ([]byte, error) ToBytes() ([]byte, error) Url() (string, error) }
OTP defines the methods available for a one time password provider
type OTPProvider ¶
type OTPProvider interface { GenerateTOTP(account string, hash crypto.Hash) (OTP, error) TOTPFromBytes(encryptedMessage []byte) (OTP, error) IsInterfaceNil() bool }
OTPProvider defines the methods available for an otp provider
type SecureOtpHandler ¶ added in v1.0.14
type SecureOtpHandler interface { FreezeBackOffTime() uint64 FreezeMaxFailures() uint64 SecurityModeBackOffTime() uint64 SecurityModeMaxFailures() uint64 SetSecurityModeNoExpire(key string) error UnsetSecurityModeNoExpire(key string) error IsVerificationAllowedAndIncreaseTrials(account string, ip string) (*requests.OTPCodeVerifyData, error) Reset(account string, ip string) DecrementSecurityModeFailedTrials(account string) error ExtendSecurityMode(account string) error IsInterfaceNil() bool }
SecureOtpHandler defines the methods available for a secure otp handler
type ShardedStorageFactory ¶
type ShardedStorageFactory interface { Create() (core.StorageWithIndex, error) IsInterfaceNil() bool }
ShardedStorageFactory defines the methods available for a sharded storage factory
Click to show internal directories.
Click to hide internal directories.