Documentation
¶
Overview ¶
Package gauth implements the time-based OTP generation scheme used by Google Authenticator.
Index ¶
- Constants
- func Codes(u *otpauth.URL) (prev, curr, next string, _ error)
- func CodesAtTimeStep(u *otpauth.URL, timeStep uint64) (prev, curr, next string, _ error)
- func LoadConfigFile(path string, getPass func() ([]byte, error)) ([]byte, error)
- func ParseConfig(data []byte) ([]*otpauth.URL, error)
- func ReadConfigFile(path string) ([]byte, bool, error)
- func WriteConfigFile(path string, passwd []byte, newConfig []byte) error
Constants ¶
View Source
const (
DefaultPeriod = 30
)
Variables ¶
This section is empty.
Functions ¶
func CodesAtTimeStep ¶
CodesAtTimeStep returns the previous, current, and next codes from u at the given time step value.
func LoadConfigFile ¶
LoadConfigFile reads and decrypts, if necessary, the CSV config at path. The getPass function is called to obtain a password if needed.
func ParseConfig ¶
ParseConfig parses the contents of data as a gauth configuration file. Returns a slice of otpauth URLs representing the parsed configurations.
func ReadConfigFile ¶ added in v1.3.0
ReadConfigFile reads the config file at path and returns its contents and whether it is encrypted or not
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.