passkey

package
v0.0.0-...-122f59b Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DependencySet = wire.NewSet(
	wire.Struct(new(Store), "*"),
	wire.Struct(new(Provider), "*"),
)

Functions

This section is empty.

Types

type PasskeyService

type PasskeyService interface {
	PeekAttestationResponse(attestationResponse []byte) (creationOptions *model.WebAuthnCreationOptions, credentialID string, signCount int64, err error)
	GetCredentialIDFromAssertionResponse(assertionResponse []byte) (credentialID string, err error)
}

nolint: golint

type Provider

type Provider struct {
	Store   *Store
	Clock   clock.Clock
	Passkey PasskeyService
}

func (*Provider) Create

func (p *Provider) Create(i *identity.Passkey) error

func (*Provider) Delete

func (p *Provider) Delete(i *identity.Passkey) error

func (*Provider) Get

func (p *Provider) Get(userID, id string) (*identity.Passkey, error)

func (*Provider) GetByAssertionResponse

func (p *Provider) GetByAssertionResponse(assertionResponse []byte) (*identity.Passkey, error)

func (*Provider) GetMany

func (p *Provider) GetMany(ids []string) ([]*identity.Passkey, error)

func (*Provider) List

func (p *Provider) List(userID string) ([]*identity.Passkey, error)

func (*Provider) New

func (p *Provider) New(
	userID string,
	attestationResponse []byte,
) (*identity.Passkey, error)

type Store

type Store struct {
	SQLBuilder  *appdb.SQLBuilderApp
	SQLExecutor *appdb.SQLExecutor
}

func (*Store) Create

func (s *Store) Create(i *identity.Passkey) error

func (*Store) Delete

func (s *Store) Delete(i *identity.Passkey) error

func (*Store) Get

func (s *Store) Get(userID, id string) (*identity.Passkey, error)

func (*Store) GetByCredentialID

func (s *Store) GetByCredentialID(credentialID string) (*identity.Passkey, error)

func (*Store) GetMany

func (s *Store) GetMany(ids []string) ([]*identity.Passkey, error)

func (*Store) List

func (s *Store) List(userID string) ([]*identity.Passkey, error)

Jump to

Keyboard shortcuts

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