Versions in this module Expand all Collapse all v0 v0.9.2 Feb 6, 2026 Changes in this version + func GetFreePort(tb testing.TB) int + func NewEmbeddedAuthServer(ctx context.Context, tb testing.TB, cfg *authserver.RunConfig) *authserverrunner.EmbeddedAuthServer + func NewTestAuthServerConfig(tb testing.TB, upstreamURL string, opts ...AuthServerOption) *authserver.RunConfig + type AuthServerOption func(*authServerConfig) + func WithAllowedAudiences(audiences []string) AuthServerOption + func WithHMACSecrets(files []string) AuthServerOption + func WithIssuer(issuer string) AuthServerOption + func WithScopesSupported(scopes []string) AuthServerOption + func WithSigningKey(cfg *authserver.SigningKeyRunConfig) AuthServerOption + func WithTokenLifespans(cfg *authserver.TokenLifespanRunConfig) AuthServerOption + func WithUpstreams(upstreams []authserver.UpstreamRunConfig) AuthServerOption + type MockUpstreamIDP struct + AuthorizeHandler func(w http.ResponseWriter, r *http.Request) + Server *httptest.Server + TokenHandler func(w http.ResponseWriter, r *http.Request) + UserInfoHandler func(w http.ResponseWriter, r *http.Request) + func NewMockUpstreamIDP(tb testing.TB, opts ...MockUpstreamOption) *MockUpstreamIDP + func (m *MockUpstreamIDP) URL() string + type MockUpstreamOption func(*MockUpstreamIDP) + func WithAuthorizeHandler(h func(w http.ResponseWriter, r *http.Request)) MockUpstreamOption + func WithTokenHandler(h func(w http.ResponseWriter, r *http.Request)) MockUpstreamOption + func WithUserInfoHandler(h func(w http.ResponseWriter, r *http.Request)) MockUpstreamOption + type OAuthClient struct + func NewOAuthClient(baseURL string) *OAuthClient + func (c *OAuthClient) ExchangeToken(params url.Values) (map[string]interface{}, int, error) + func (c *OAuthClient) Get(path string) (*http.Response, error) + func (c *OAuthClient) GetJWKS() (map[string]interface{}, int, error) + func (c *OAuthClient) GetOAuthDiscovery() (map[string]interface{}, int, error) + func (c *OAuthClient) GetOIDCDiscovery() (map[string]interface{}, int, error) + func (c *OAuthClient) RegisterClient(clientMetadata map[string]interface{}) (map[string]interface{}, int, error) + func (c *OAuthClient) StartAuthorization(params url.Values) (*http.Response, error)