package testing

import "k8s.io/client-go/plugin/pkg/auth/authenticator/token/oidc/testing"

Index

Functions

func GenerateSelfSignedCert

func GenerateSelfSignedCert(t *testing.T, host, certPath, keyPath string)

generateSelfSignedCert generates a self-signed cert/key pairs and writes to the certPath/keyPath. This method is mostly identical to crypto.GenerateSelfSignedCert except for the 'IsCA' and 'KeyUsage' in the certificate template. (Maybe we can merge these two methods).

Types

type OIDCProvider

type OIDCProvider struct {
	Mux     *http.ServeMux
	PCFG    oidc.ProviderConfig
	PrivKey *key.PrivateKey
	// contains filtered or unexported fields
}

func NewOIDCProvider

func NewOIDCProvider(t *testing.T, issuerPath string) *OIDCProvider

NewOIDCProvider provides a bare minimum OIDC IdP Server useful for testing.

func (*OIDCProvider) ServeTLSWithKeyPair

func (op *OIDCProvider) ServeTLSWithKeyPair(cert, key string) (*httptest.Server, error)

Source Files

provider.go

Version
v3.0.0-beta.0+incompatible
Published
Mar 31, 2017
Platform
js/wasm
Imports
23 packages
Last checked
2 minutes ago

Tools for package owners.