auth

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	OpenIDConfigurationUrl string `env:"AUTH_OPENID_CONFIGURATION_URL"`
}

func NewConfig

func NewConfig() *Config

type Service

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

func NewService

func NewService(cfg *Config, usersSrv UsersService) *Service

func (*Service) AddKey added in v0.6.0

func (s *Service) AddKey(k jwk.Key) error

func (*Service) AuthenticateUser

func (s *Service) AuthenticateUser(ctx context.Context, token string) (*users.User, error)

type UsersService

type UsersService interface {
	GetUser(ctx context.Context, ID string) (*users.User, error)
}

Jump to

Keyboard shortcuts

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