Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockOIDCServer ¶
type MockOIDCServer struct {
Server *httptest.Server
IssuerURL string
// contains filtered or unexported fields
}
MockOIDCServer provides a minimal OIDC issuer suitable for unit tests.
func NewMockOIDCServer ¶
func NewMockOIDCServer(t *testing.T) *MockOIDCServer
NewMockOIDCServer starts a mock OIDC issuer that serves discovery + JWKS.
func (*MockOIDCServer) Close ¶
func (m *MockOIDCServer) Close()
Close shuts down the underlying test server.
func (*MockOIDCServer) SetUserInfo ¶
func (m *MockOIDCServer) SetUserInfo(data map[string]any)
SetUserInfo sets the JSON object returned from /userinfo.
func (*MockOIDCServer) SignIDToken ¶
func (m *MockOIDCServer) SignIDToken(claims map[string]any) (string, error)
SignIDToken signs the provided claims and returns a compact JWT string.
Click to show internal directories.
Click to hide internal directories.