Documentation
¶
Index ¶
- func AddRegistrationToken(token, username string) error
- func Authenticate(address, code string) (err error)
- func DeleteDevice(address string) error
- func DeleteRegistrationToken(identifier string) error
- func GenerateToken(username string) (token string, err error)
- func GetRegistrationToken(token string) (username string, err error)
- func GetRegistrationTokens() (map[string]string, error)
- func IsEnforcingMFA(address string) bool
- func Load(path string) error
- func SetAttempts(address string, attempts int) error
- func SetMFAEnforcing(address string) error
- func ShowSecret(address string) (*otp.Key, error)
- func UpdateDeviceEndpoint(address string, endpoint *net.UDPAddr) error
- type Device
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRegistrationToken ¶
Add a token to the database for the specific username, may fail of the token does not meet complexity requirements
func Authenticate ¶
func DeleteDevice ¶
func DeleteRegistrationToken ¶
func GenerateToken ¶
Randomly generate a token for a specific username
func GetRegistrationToken ¶
func GetRegistrationTokens ¶
Returns list of tokens in a map of token : username
func IsEnforcingMFA ¶
func SetAttempts ¶
func SetMFAEnforcing ¶
Types ¶
type Device ¶
type Device struct { Address string Publickey string Username string Enforcing bool Attempts int Endpoint *net.UDPAddr }
func CreateMFAEntry ¶
func GetDeviceByUsername ¶
func GetDevices ¶
Click to show internal directories.
Click to hide internal directories.