user

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID          uint64
	Name        string
	DisplayName string
	Credentials []webauthn.Credential
}

func NewUser

func NewUser(name string) *User

func UnmarshalUser

func UnmarshalUser(user string) (*User, error)

func (*User) AddCredential

func (u *User) AddCredential(cred webauthn.Credential)

func (User) CredentialById

func (u User) CredentialById(id []byte) (*webauthn.Credential, error)

Return user credential by ID

func (User) Marshal

func (u User) Marshal() (string, error)

func (User) UserRegistrationOptions

func (u User) UserRegistrationOptions(credCreateOptions *protocol.PublicKeyCredentialCreationOptions)

Set user registration options, such as excluding registered credentials

func (User) WebAuthnCredentials

func (u User) WebAuthnCredentials() []webauthn.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

WebAuthnIcon is not (yet) implemented

func (User) WebAuthnName

func (u User) WebAuthnName() string

Jump to

Keyboard shortcuts

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