auth

package
v0.0.0-...-1354829 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInternal = errors.New("internal failure")
View Source
var ErrInvalidToken = errors.New("invalid token")
View Source
var ErrInvalidUserId = errors.New("invalid user id")

Functions

func GetIncomingAuthInfo

func GetIncomingAuthInfo(ctx context.Context) (groupId, userId string, err error)

func SetIncomingAuthInfo

func SetIncomingAuthInfo(src context.Context, groupId, userId string) (dst context.Context)

func SetOutgoingAuthInfo

func SetOutgoingAuthInfo(src context.Context, groupId, userId string) (dst context.Context)

Types

type Service

type Service interface {
	Authenticate(ctx context.Context, userId, token string) (err error)
}

func NewLogging

func NewLogging(svc Service, log *slog.Logger) Service

func NewService

func NewService(client ServiceClient) Service

Jump to

Keyboard shortcuts

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