biometric

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: 20 Imported by: 0

Documentation

Index

Constants

View Source
const RequestTokenType = "vnd.authgear.biometric-request"

nolint:gosec

Variables

View Source
var DependencySet = wire.NewSet(
	wire.Struct(new(Store), "*"),
	wire.Struct(new(Provider), "*"),
)
View Source
var KeyIDFormat = regexp.MustCompile(`^[-\w]{8,64}$`)

Functions

This section is empty.

Types

type Provider

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

func (*Provider) Create

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

func (*Provider) Delete

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

func (*Provider) Get

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

func (*Provider) GetByKeyID

func (p *Provider) GetByKeyID(keyID string) (*identity.Biometric, error)

func (*Provider) GetMany

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

func (*Provider) List

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

func (*Provider) New

func (p *Provider) New(
	userID string,
	keyID string,
	key []byte,
	deviceInfo map[string]interface{},
) *identity.Biometric

func (*Provider) ParseRequest

func (p *Provider) ParseRequest(requestJWT string, i *identity.Biometric) (*Request, error)

func (*Provider) ParseRequestUnverified

func (p *Provider) ParseRequestUnverified(requestJWT string) (r *Request, err error)

type Request

type Request struct {
	Key        jwk.Key                `json:"-"`
	KeyID      string                 `json:"-"`
	DeviceInfo map[string]interface{} `json:"device_info"`
	Challenge  string                 `json:"challenge"`
	Action     RequestAction          `json:"action"`
}

type RequestAction

type RequestAction string
const (
	RequestActionSetup        RequestAction = "setup"
	RequestActionAuthenticate RequestAction = "authenticate"
)

type Store

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

func (*Store) Create

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

func (*Store) Delete

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

func (*Store) Get

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

func (*Store) GetByKeyID

func (s *Store) GetByKeyID(keyID string) (*identity.Biometric, error)

func (*Store) GetMany

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

func (*Store) List

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

Jump to

Keyboard shortcuts

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