Documentation ¶
Index ¶
- Variables
- func SetLogger(l Logger)
- func Transact(db *sqlx.DB, txFn func(*sqlx.Tx) error) (err error)
- type Auth
- type DB
- func (d *DB) Close() error
- func (d *DB) Delete(id string) error
- func (d *DB) FIDO2HMACSecret(ctx context.Context, plugin fido2.FIDO2Server, pin string) (*Auth, *[32]byte, error)
- func (d *DB) List() ([]*Auth, error)
- func (d *DB) ListByType(typ Type) ([]*Auth, error)
- func (d *DB) PaperKey(paperKey string) (*Auth, *[32]byte, error)
- func (d *DB) Password(password string) (*Auth, *[32]byte, error)
- func (d *DB) RegisterFIDO2HMACSecret(ctx context.Context, plugin fido2.FIDO2Server, hs *FIDO2HMACSecret, ...) (*Auth, error)
- func (d *DB) RegisterPaperKey(paperKey string, mk *[32]byte) (*Auth, error)
- func (d *DB) RegisterPassword(password string, mk *[32]byte) (*Auth, error)
- func (d *DB) Set(auth *Auth) error
- type FIDO2HMACSecret
- type LogLevel
- type Logger
- type Option
- type Options
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidAuth = errors.New("invalid auth")
ErrInvalidAuth if auth is invalid.
Functions ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB for vault.
func NewDB ¶
NewDB creates an DB for auth. This DB is unencrypted but the auth keys themselves are encrypted.
func (*DB) FIDO2HMACSecret ¶
func (d *DB) FIDO2HMACSecret(ctx context.Context, plugin fido2.FIDO2Server, pin string) (*Auth, *[32]byte, error)
FIDO2HMACSecret authenticates using FIDO2 hmac-secret.
func (*DB) ListByType ¶
ListByType lists auth by type.
func (*DB) RegisterFIDO2HMACSecret ¶
func (d *DB) RegisterFIDO2HMACSecret(ctx context.Context, plugin fido2.FIDO2Server, hs *FIDO2HMACSecret, mk *[32]byte, pin string) (*Auth, error)
RegisterFIDO2HMACSecret registers FIDO2HMACSecret.
func (*DB) RegisterPaperKey ¶
RegisterPaperKey registers paper key auth.
func (*DB) RegisterPassword ¶
RegisterPassword registers a password.
type FIDO2HMACSecret ¶
FIDO2HMACSecret from a device.
func GenerateFIDO2HMACSecret ¶
func GenerateFIDO2HMACSecret(ctx context.Context, plugin fido2.FIDO2Server, pin string, device string, appName string) (*FIDO2HMACSecret, error)
GenerateFIDO2HMACSecret creates FIDO2 hmac-secret on a device.
type Logger ¶
type Logger interface { Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) Warningf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Fatalf(format string, args ...interface{}) }
Logger interface used in this package.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.