package
0.0.0-20250106091907-2def7cdbd4ab
Repository: https://github.com/ubuntu/authd-oidc-brokers.git
Documentation: pkg.go.dev
# Packages
Package golden provides utilities to compare and update golden files in tests.
# Functions
BadRequestHandler returns a handler that returns a 400 Bad Request response.
CustomResponseHandler returns a handler that returns a custom token response.
DefaultDeviceAuthHandler returns a handler that returns a default device auth response.
DefaultJWKHandler returns a handler that provides the signing keys from the broker.
DefaultOpenIDHandler returns a handler that returns a default OIDC configuration.
ExpiryDeviceAuthHandler returns a handler that returns a device auth response with a short expiry time.
GetSystemBusConnection returns a connection to the system bus with a safety check to avoid mistakenly connecting to the actual system bus.
HangingHandler returns a handler that hangs the request until the duration has elapsed.
MakeReadOnly makes dest read only and restore permission on cleanup.
OpenIDHandlerWithNoDeviceEndpoint returns a handler that returns an OIDC configuration without device endpoint.
StartMockProviderServer starts a new HTTP server to be used as an OIDC provider for tests.
StartSystemBusMock starts a mock dbus daemon and returns a cancel function to stop it.
TokenHandler returns a handler that returns a default token response.
UnavailableHandler returns a handler that returns a 503 Service Unavailable response.
WithHandler returns a ProviderServerOption that adds a handler for a provider endpoint specified by path.
# Variables
MockKey is the RSA key used to sign the JWTs for the mock provider.
# Structs
MockProvider is a mock that implements the Provider interface.
TokenHandlerOptions contains options for the token handler.
# Type aliases
EndpointHandler is a function that handles a request to an OIDC provider endpoint.
ProviderServerOption is a function that allows to override default options of the mock provider.