yubikey

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(opts GenerateOpts) (*otp.Key, error)

Types

type GenerateOpts

type GenerateOpts struct {
	// Name of the issuing Organization/Company.
	Issuer string
	// Name of the User's Account (eg, email address)
	AccountName string
	// Secret to store. Defaults to a randomly generated secret of SecretSize.  You should generally leave this empty.
	Secret string
	// Digits to request. Defaults to 6.
	Digits otp.Digits
	// Algorithm to use for HMAC. Defaults to SHA1.
	Algorithm otp.Algorithm
}

todo::generate keyUrl

type Validator

type Validator struct {
	Secret  string
	Counter uint64
	Use     uint64
	Token   *yubikey.Token
}

func NewValidator

func NewValidator(secret string, counter uint64, use uint64) *Validator

func (*Validator) Validate

func (v *Validator) Validate(passcode string) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL