application

package
v3.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoIdentity user is considered to be not logged in
	ErrNoIdentity = errors.New("no identity")
)

Functions

This section is empty.

Types

type Service

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

Service for customer management

func (*Service) GetForIdentity added in v3.3.0

func (s *Service) GetForIdentity(ctx context.Context, request *web.Request) (domain.Customer, error)

GetForIdentity returns the authenticated user if logged in

func (*Service) GetUserID added in v3.3.0

func (s *Service) GetUserID(ctx context.Context, request *web.Request) (string, error)

GetUserID returns the current user ID if logged in

Can be used to check if user is logged in. Returns ErrNoIdentity if user is considered to be not logged in.

func (*Service) Inject added in v3.3.0

func (s *Service) Inject(
	webIdentityService *auth.WebIdentityService,
	customerIdentityService domain.CustomerIdentityService,
) *Service

Inject dependencies

Jump to

Keyboard shortcuts

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