oob

package
v0.0.0-...-81dc835 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

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 LoginIDNormalizerFactory

type LoginIDNormalizerFactory interface {
	NormalizerWithLoginIDType(loginIDKeyType model.LoginIDKeyType) internalinterface.LoginIDNormalizer
}

type Provider

type Provider struct {
	Store                    *Store
	LoginIDNormalizerFactory LoginIDNormalizerFactory
	Clock                    clock.Clock
}

func (*Provider) Create

func (p *Provider) Create(ctx context.Context, a *authenticator.OOBOTP) error

func (*Provider) Delete

func (p *Provider) Delete(ctx context.Context, a *authenticator.OOBOTP) error

func (*Provider) Get

func (p *Provider) Get(ctx context.Context, userID string, id string) (*authenticator.OOBOTP, error)

func (*Provider) GetMany

func (p *Provider) GetMany(ctx context.Context, ids []string) ([]*authenticator.OOBOTP, error)

func (*Provider) List

func (p *Provider) List(ctx context.Context, userID string) ([]*authenticator.OOBOTP, error)

func (*Provider) New

func (p *Provider) New(id string, userID string, oobAuthenticatorType model.AuthenticatorType, target string, isDefault bool, kind string) (*authenticator.OOBOTP, error)

func (*Provider) Update

func (p *Provider) Update(ctx context.Context, a *authenticator.OOBOTP) error

func (*Provider) UpdateTarget

func (p *Provider) UpdateTarget(a *authenticator.OOBOTP, option UpdateTargetOption) (*authenticator.OOBOTP, bool)

UpdateTarget return new authenticator pointer if target is changed Otherwise original authenticator will be returned

type Store

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

func (*Store) Create

func (s *Store) Create(ctx context.Context, a *authenticator.OOBOTP) (err error)

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, id string) error

func (*Store) Get

func (s *Store) Get(ctx context.Context, userID string, id string) (*authenticator.OOBOTP, error)

func (*Store) GetMany

func (s *Store) GetMany(ctx context.Context, ids []string) ([]*authenticator.OOBOTP, error)

func (*Store) List

func (s *Store) List(ctx context.Context, userID string) ([]*authenticator.OOBOTP, error)

func (*Store) Update

func (s *Store) Update(ctx context.Context, a *authenticator.OOBOTP) (err error)

type UpdateTargetOption

type UpdateTargetOption struct {
	NewTarget string
}

Jump to

Keyboard shortcuts

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