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 FrozenOtpHandler ¶
type FrozenOtpHandler interface {
BackOffTime() uint64
MaxFailures() uint64
IsVerificationAllowedAndIncreaseTrials(account string, ip string) (*requests.OTPCodeVerifyData, error)
Reset(account string, ip string)
IsInterfaceNil() bool
}
FrozenOtpHandler defines the methods available for a frozen otp handler
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 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.