Documentation ¶
Index ¶
- func GenerateJWK() (jwk.Key, jwk.Set, string, error)
- func GenerateJWKS() (string, error)
- func InitClient(t *testing.T, initCfg map[string]any)
- func RegistryMockup(t *testing.T, prefix string) *httptest.Server
- func TestContext(ictx context.Context, t *testing.T) (ctx context.Context, cancel context.CancelFunc, egrp *errgroup.Group)
- func WriteBigBuffer(t *testing.T, fp io.WriteCloser, sizeMB int) (size int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateJWK ¶
GenerateJWK generates a JWK private key and a corresponding JWKS public key, and the string representation of the public key
func GenerateJWKS ¶
func InitClient ¶
Initialize the client for a unit test
Will set the configuration to a temporary directory (to avoid pulling in global configuration) and set some arbitrary viper configurations
func RegistryMockup ¶
For these tests, we only need to lookup key locations. Create a dummy registry that only returns the jwks_uri location for the given key. Once a server is instantiated, it will only return locations for the provided prefix. To change prefixes, create a new registry mockup.
func TestContext ¶
func WriteBigBuffer ¶
Writes a file at least the specified size in MB
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.