Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenerateRequest ¶
type GenerateResponse ¶
type GenerateResponse struct {
// one time pass code
Code string `json:"code"`
}
type OtpService ¶
type OtpService struct {
// contains filtered or unexported fields
}
func NewOtpService ¶
func NewOtpService(token string) *OtpService
func (*OtpService) Generate ¶
func (t *OtpService) Generate(request *GenerateRequest) (*GenerateResponse, error)
Generate an OTP (one time pass) code
func (*OtpService) Validate ¶
func (t *OtpService) Validate(request *ValidateRequest) (*ValidateResponse, error)
Validate the OTP code
type ValidateRequest ¶
type ValidateResponse ¶
type ValidateResponse struct {
// returns true if the code is valid for the ID
Success bool `json:"success"`
}
Click to show internal directories.
Click to hide internal directories.