webauthn

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LoginSalt = []byte("h132_login")

Functions

func B64ToBytes

func B64ToBytes(b64 []byte) ([]byte, error)

func Zb64ToBytes

func Zb64ToBytes(zb64 []byte) ([]byte, error)

Types

type Credential

type Credential struct {
	UserName        string
	ReflectorUrlStr string

	// WebAuthn Credential JSON
	WacJson []byte
}

type GetPRFSecretSession

type GetPRFSecretSession struct {
	GetPRFSecretUrlStr string
	// contains filtered or unexported fields
}

func StartGetPRFSecretSession

func StartGetPRFSecretSession(cred *Credential, salt []byte, randr io.Reader) (*GetPRFSecretSession, error)

func (*GetPRFSecretSession) Complete

func (sess *GetPRFSecretSession) Complete(b64resp []byte) ([]byte, error)

Complete completes the GetPRFSecretSession and returns the PRF secret and the credential public key

type WebAuthnRegistrationSession

type WebAuthnRegistrationSession struct {
	RegistrationUrlStr string
	// contains filtered or unexported fields
}

func StartRegistration

func StartRegistration(reflectorUrlStr, userName string) (*WebAuthnRegistrationSession, error)

func (*WebAuthnRegistrationSession) Complete

func (sess *WebAuthnRegistrationSession) Complete(zb64resp []byte) (*Credential, error)

Jump to

Keyboard shortcuts

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