Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultStepTime as per RFC 6238 is 30 seconds DefaultStepTime = 30 // DefaultT0 as per RFC 6238 is 0 DefaultT0 = 0 // DefaultDigits as per RFC 6238 is 6 digits DefaultDigits = 6 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Account ¶
type Account struct {
Issuer string `json:"issuer"`
Label string `json:"label"`
T0 int `json:"t_0"`
StepTime int `json:"step_time"`
Digits int `json:"digits"`
Key string `json:"key"`
}
Account represents a single 2fa activated account Issuer and Label together provides a unique account even for same service. Ex: google with multiple accounts
func LoadAccounts ¶
LoadAccounts will a load accounts matching issuer and label if label is empty, loads all the accounts matching issuer if issuer and label are empty, all th accounts are returned
func NewAccount ¶
NewAccount returns a new 2fa account with default values
Click to show internal directories.
Click to hide internal directories.