operations

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(name string, dsn string) *Manager

func (*Manager) User

func (m *Manager) User() *User

type User

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

User represents the user model It implements the webauthn.User interface

func (*User) AddCredential

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

AddCredential associates the credential to the user

func (*User) Create

func (u *User) Create(name string, displayName string) (*User, error)

func (*User) CredentialExcludeList

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

CredentialExcludeList returns a CredentialDescriptor array filled with all a user's credentials

func (*User) GetByName

func (u *User) GetByName(name string) (*User, error)

GetUser returns a *User by the user's username

func (*User) GetOrCreate

func (u *User) GetOrCreate(name string, displayName string) (*User, error)

func (*User) WebAuthnCredentials

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

WebAuthnCredentials returns credentials owned by the user

func (User) WebAuthnDisplayName

func (u User) WebAuthnDisplayName() string

WebAuthnDisplayName returns the user's display name

func (User) WebAuthnID

func (u User) WebAuthnID() []byte

WebAuthnID returns the user's ID

func (User) WebAuthnIcon

func (u User) WebAuthnIcon() string

WebAuthnIcon is not (yet) implemented

func (User) WebAuthnName

func (u User) WebAuthnName() string

WebAuthnName returns the user's username

Jump to

Keyboard shortcuts

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