testing

package
v1.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2016 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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).

func MustParseURL

func MustParseURL(s string) *url.URL

Types

type OIDCProvider

type OIDCProvider struct {
	Mux     *http.ServeMux
	PCFG    oidc.ProviderConfig
	PrivKey *key.PrivateKey
}

func NewOIDCProvider

func NewOIDCProvider(t *testing.T) *OIDCProvider

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

func (*OIDCProvider) AddMinimalProviderConfig

func (op *OIDCProvider) AddMinimalProviderConfig(srv *httptest.Server)

func (*OIDCProvider) ServeTLSWithKeyPair

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL