webauthn

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ExampleWebAuthnConfig = map[string]string{
		"RPDisplayName": "Ulysses Default DisplayName",
		"RPID":          "localhost",
		"RPOriginURL":   "http://localhost:8081",
		"RPIconURL":     "http://localhost:8081/favicon.ico",
	}
)

Functions

This section is empty.

Types

type User

type User struct {
	ID       uint64
	UserName string
	// DisplayName  string // Use UserName instead
	IconURL          string           // Baked in by WebAuthn struct
	AuthnCredentials []duo.Credential // Load from DB (if any)

}

func CreateNewUser

func CreateNewUser(id uint64, name, iconURL string) (*User, error)

func LoadUser

func LoadUser(id uint64) (*User, error)

func (*User) CredentialExcludeList

func (u *User) CredentialExcludeList() []protocol.CredentialDescriptor

func (*User) UpdateDatabase

func (u *User) UpdateDatabase() error

func (*User) WebAuthnCredentials

func (u *User) WebAuthnCredentials() []duo.Credential

func (*User) WebAuthnDisplayName

func (u *User) WebAuthnDisplayName() string

func (*User) WebAuthnID

func (u *User) WebAuthnID() []byte

func (*User) WebAuthnIcon

func (u *User) WebAuthnIcon() string

func (*User) WebAuthnName

func (u *User) WebAuthnName() string

type WebAuthn

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

func NewWebAuthn

func NewWebAuthn(conf map[string]string) *WebAuthn

func (*WebAuthn) CompleteSignUp

func (w *WebAuthn) CompleteSignUp(userID uint64, mfaConf map[string]string) error

func (*WebAuthn) InitSignUp

func (w *WebAuthn) InitSignUp(userID uint64, username string) (map[string]interface{}, error)

func (*WebAuthn) NewChallenge

func (w *WebAuthn) NewChallenge(userID uint64) (map[string]interface{}, error)

func (*WebAuthn) Registered

func (*WebAuthn) Registered(userID uint64) bool

func (*WebAuthn) Remove

func (*WebAuthn) Remove(userID uint64) error

func (*WebAuthn) SubmitChallenge

func (w *WebAuthn) SubmitChallenge(userID uint64, challengeResponse map[string]string) error

Jump to

Keyboard shortcuts

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