yubikey

package
v3.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Prompt

type Prompt struct {
	// contains filtered or unexported fields
}

Prompt defines a yubikey prompt object

func NewPrompt

func NewPrompt() *Prompt

NewPrompt populates the yubikey mapping from a dotfile, if it exists

func (*Prompt) AddMapping

func (p *Prompt) AddMapping(mapping map[string]string)

AddMapping adds a mapping for OTP names

func (*Prompt) AddMappingFromFile

func (p *Prompt) AddMappingFromFile(file string) error

AddMappingFromFile adds a mapping for OTP names from a file

func (*Prompt) AddSerials added in v3.2.0

func (p *Prompt) AddSerials(serials map[string][]string)

AddSerials adds a serial lookup for OTP names

func (*Prompt) PluggedIn added in v3.0.1

func (p *Prompt) PluggedIn() bool

PluggedIn returns true if a yubikey device is found on the system

func (*Prompt) Prompt

func (p *Prompt) Prompt(arn string) (string, error)

Prompt asks the yubikey for a code

func (*Prompt) RetryText

func (p *Prompt) RetryText(arn string) string

RetryText returns helper text for retrying the MFA storage

func (*Prompt) Store

func (p *Prompt) Store(arn, base32seed string) error

Store writes an OTP to the yubikey

Jump to

Keyboard shortcuts

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