Documentation
¶
Overview ¶
Package stdcrpcaccesstest provides testing utilities for testing with access control.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SignTestJWT ¶
SignTestJWT signs a valid JWT against a well-known private key for testing.
func TestKeyServer ¶
TestKeyServer starts a server for testing that serves the key set.
func WithTestAuthBackend ¶
WithTestAuthBackend injects dependencies for allowing tests to sign and validate access tokens.
func WithTestToken ¶
func WithTestToken(tb testing.TB, base connect.HTTPClient) connect.HTTPClient
WithTestToken is a http client middleware that always adds a valid (self signed) token for testing.
Types ¶
type TestAuthBackend ¶
type TestAuthBackend struct {
// contains filtered or unexported fields
}
TestAuthBackend is an auth backend that is run locally and we control the signing process for.
func (TestAuthBackend) JWKSEndpoint ¶
func (ap TestAuthBackend) JWKSEndpoint() string
Click to show internal directories.
Click to hide internal directories.