app

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Providers

type Providers struct {
	TemplateEngine *tmpl.Engine
	SMSSender      sms.Sender
	Mailer         mailer.Mailer
	Datastore      *repo.Repo
	Config         config.Config
	Common         *common.Service
	ProtoRegistry  *protoregistry.Files
	Validator      *protovalidate.Validator
	Cache          cache.Cache
}

func (*Providers) AddAccessToken

func (p *Providers) AddAccessToken(user models.User, roles []models.Role, ttl time.Duration, parentTokenID string, kind string, headers http.Header) (string, string, error)

func (*Providers) AddRefreshToken

func (p *Providers) AddRefreshToken(user models.User, roles []models.Role, kind string, headers http.Header) (string, string, error)

func (*Providers) CreateSignedJWT

func (p *Providers) CreateSignedJWT(user models.User, roles []models.Role, parentTokenID string, ttl time.Duration, kind string, scopes ...jwt.Scope) (string, string, error)

func (*Providers) GenerateRegistrationToken

func (p *Providers) GenerateRegistrationToken(ctx context.Context, creator models.User, maxCount uint64, ttl time.Duration, initialRoles []string) (string, error)

func (*Providers) GetUserProfileProto

func (p *Providers) GetUserProfileProto(ctx context.Context, usr models.User) (*idmv1.Profile, error)

func (*Providers) HandleRequestedRedirect

func (p *Providers) HandleRequestedRedirect(ctx context.Context, requestedRedirect string) (string, error)

func (*Providers) SendMailVerification

func (p *Providers) SendMailVerification(ctx context.Context, user models.User, mail models.EMail) error

func (*Providers) ValidateUserExtraData

func (p *Providers) ValidateUserExtraData(pb *structpb.Struct) error

Jump to

Keyboard shortcuts

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