authn

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: EUPL-1.2 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPClient added in v0.8.0

func HTTPClient(ctx context.Context, scope []string, uraNumber string, targetAudience string, cfg MinistryAuthConfig) (*http.Client, error)

Types

type Component

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

Component handles authentication with external services (MinVWS).

func New

func New(config Config) *Component

func (*Component) MinVWSHTTPClient added in v0.8.0

func (c *Component) MinVWSHTTPClient(ctx context.Context, scope []string, uraNumber string, audience string) (*http.Client, error)

MinVWSHTTPClient creates an HTTP client suitable for making authenticated requests to the Ministry of Health's APIs.

func (*Component) RegisterHttpHandlers

func (c *Component) RegisterHttpHandlers(_ *http.ServeMux, _ *http.ServeMux)

func (*Component) Start

func (c *Component) Start() error

func (*Component) Stop

func (c *Component) Stop(_ context.Context) error

type Config

type Config struct {
	MinVWS MinistryAuthConfig `koanf:"minvws"`
}

type HTTPClientProvider added in v0.8.0

type HTTPClientProvider func(ctx context.Context, scope []string, uraNumber string, audience string) (*http.Client, error)

type MinistryAuthConfig added in v0.8.0

type MinistryAuthConfig struct {
	tlsutil.Config `koanf:",squash"`
	// TokenEndpoint is the URL of the Ministry's token endpoint, e.g. "https://oauth.proeftuin.gf.irealisatie.nl/oauth/token"
	TokenEndpoint string `koanf:"tokenendpoint"`
}

MinistryAuthConfig holds the configuration for authenticating with the Ministry of Health's (MinVWS) OAuth2 Authorization Server using the client credentials flow with JWT assertion.

Jump to

Keyboard shortcuts

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