auth

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoAuthServiceInContext  = errors.New("no auth service in context")
	ErrInvalidServiceInContext = errors.New("invalid service in context")
)

Functions

This section is empty.

Types

type Option added in v0.0.26

type Option func(*Service)

type Service

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

func FromContext

func FromContext(ctx context.Context) (*Service, error)

func New

func New(cfg *config.Config, httpClient *http.Client, log *slog.Logger, opts ...Option) (*Service, error)

func (*Service) ClearCache

func (s *Service) ClearCache()

func (*Service) RetrieveTokenForAPI

func (s *Service) RetrieveTokenForAPI(ctx context.Context, target string) (string, error)

func (*Service) ToContext

func (s *Service) ToContext(ctx context.Context) context.Context

func (*Service) Warmup

func (s *Service) Warmup(ctx context.Context) error

Jump to

Keyboard shortcuts

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