oidc

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKeys

func GetKeys(client *http.Client, jwksURI string) (*keyfunc.JWKS, error)

GetKeys fetches the JWKS from the given URI using the provided HTTP client.

func NewAuthMiddleware

func NewAuthMiddleware(api huma.API, issuer, audience string) func(ctx huma.Context, next func(huma.Context))

NewAuthMiddleware returns a middleware that validates OIDC tokens.

Types

type Config

type Config struct {
	// Issuer is the OIDC issuer URL.
	Issuer string `json:"issuer"`
	// JWKsURI is the URI of the JWKS.
	JWKsURI string `json:"jwks_uri"`
}

Config holds the OIDC configuration.

func GetConfiguration

func GetConfiguration(ctx context.Context, client *retryablehttp.Client, url string) (*Config, error)

GetConfiguration fetches the OIDC configuration from the given URL using the provided HTTP client.

Jump to

Keyboard shortcuts

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