stores

package
v0.0.0-...-77126c2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SessionDB

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

func NewSessionDB

func NewSessionDB(db *sql.DB) *SessionDB

func (*SessionDB) AuthenticateSession

func (sdb *SessionDB) AuthenticateSession(sessionID string) error

func (*SessionDB) DeleteSession

func (sdb *SessionDB) DeleteSession(sessionID string) error

func (*SessionDB) GetSession

func (sdb *SessionDB) GetSession(sessionID string) (*webauthn.SessionData, bool, error)

GetSession returns a *SessionData by the session's ID

func (*SessionDB) StartSession

func (sdb *SessionDB) StartSession(data *webauthn.SessionData) (string, error)

type UserDB

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

func NewUsersDB

func NewUsersDB(db *sql.DB) *UserDB

func (*UserDB) AddCredentialsForUser

func (udb *UserDB) AddCredentialsForUser(user *types.User, credentials []webauthn.Credential) error

func (*UserDB) DeleteUserByID

func (udb *UserDB) DeleteUserByID(id string) error

func (*UserDB) GetUser

func (udb *UserDB) GetUser(username string) (*types.User, error)

func (*UserDB) GetUserByID

func (udb *UserDB) GetUserByID(id string) (*types.User, error)

func (*UserDB) PutUser

func (udb *UserDB) PutUser(user *types.User) error

Jump to

Keyboard shortcuts

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