stdattrs

package
v0.0.0-...-2b8ec9a Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type ClaimStore

type ClaimStore interface {
	ListByClaimName(userID string, claimName string) ([]*verification.Claim, error)
}

type EventService

type EventService interface {
	DispatchEvent(payload event.Payload) error
}

type IdentityService

type IdentityService interface {
	ListByUser(userID string) ([]*identity.Info, error)
}

type PictureTransformer

type PictureTransformer struct {
	HTTPProto     httputil.HTTPProto
	HTTPHost      httputil.HTTPHost
	ImagesCDNHost config.ImagesCDNHost
}

func (*PictureTransformer) RepresentationFormToStorageForm

func (t *PictureTransformer) RepresentationFormToStorageForm(key string, value interface{}) (interface{}, error)

func (*PictureTransformer) StorageFormToRepresentationForm

func (t *PictureTransformer) StorageFormToRepresentationForm(key string, value interface{}) (interface{}, error)

type Service

type Service struct {
	UserProfileConfig *config.UserProfileConfig
	ServiceNoEvent    *ServiceNoEvent
	Identities        IdentityService
	UserQueries       UserQueries
	UserStore         UserStore
	Events            EventService
}

func (*Service) DeriveStandardAttributes

func (s *Service) DeriveStandardAttributes(role accesscontrol.Role, userID string, updatedAt time.Time, attrs map[string]interface{}) (map[string]interface{}, error)

func (*Service) PopulateIdentityAwareStandardAttributes

func (s *Service) PopulateIdentityAwareStandardAttributes(userID string) (err error)

func (*Service) PopulateStandardAttributes

func (s *Service) PopulateStandardAttributes(userID string, iden *identity.Info) error

func (*Service) UpdateStandardAttributes

func (s *Service) UpdateStandardAttributes(role accesscontrol.Role, userID string, stdAttrs map[string]interface{}) error

type ServiceNoEvent

type ServiceNoEvent struct {
	UserProfileConfig *config.UserProfileConfig
	Identities        IdentityService
	UserQueries       UserQueries
	UserStore         UserStore
	ClaimStore        ClaimStore
	Transformer       Transformer
}

func (*ServiceNoEvent) DeriveStandardAttributes

func (s *ServiceNoEvent) DeriveStandardAttributes(role accesscontrol.Role, userID string, updatedAt time.Time, attrs map[string]interface{}) (map[string]interface{}, error)

DeriveStandardAttributes populates email_verified and phone_number_verified, if email or phone_number are found in attrs.

func (*ServiceNoEvent) PopulateIdentityAwareStandardAttributes

func (s *ServiceNoEvent) PopulateIdentityAwareStandardAttributes(userID string) (err error)

func (*ServiceNoEvent) UpdateStandardAttributes

func (s *ServiceNoEvent) UpdateStandardAttributes(role accesscontrol.Role, userID string, stdAttrs map[string]interface{}) error

type Transformer

type Transformer interface {
	StorageFormToRepresentationForm(key string, value interface{}) (interface{}, error)
	RepresentationFormToStorageForm(key string, value interface{}) (interface{}, error)
}

type UserQueries

type UserQueries interface {
	GetRaw(userID string) (*user.User, error)
}

type UserStore

type UserStore interface {
	UpdateStandardAttributes(userID string, stdAttrs map[string]interface{}) error
}

Jump to

Keyboard shortcuts

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