integration

package
v0.0.0-...-3de4a33 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTestClient

func BuildTestClient(certificate *jwt_certificate.Certificate, clientSecret string, jwksServer *httptest.Server, middlwareServer *httptest.Server, tokenSigningMethod jwtgo.SigningMethod, requestPath string, overrideClient overrideClient, overrideClaims overrideClaims, overrideToken overrideToken) (client *http.Client, nonce string, issuedAt string, signedToken string, clientRequestUrl *url.URL, expectedRedirectorUrl *url.URL, err error)

func BuildTestJwkServer

func BuildTestJwkServer(publicKeyRootPath string, privateKeyRootPath string, oidcDiscoveryUriPath string, jwksUriPath string) (certificate *jwt_certificate.Certificate, jwksServer *httptest.Server, err error)

func BuildTestServers

func BuildTestServers(publicKeyRootPath string, privateKeyRootPath string, overridePluginConfiguration overridePluginConfiguration) (certificate *jwt_certificate.Certificate, jwksServer *httptest.Server, pluginServer *httptest.Server, err error)

func MustNewRequest

func MustNewRequest(method, urlStr string, body io.Reader) (*http.Request, error)

MustNewRequest creates a new http get request or panics if it can't.

func RunTestAuthenticationWithConfigurationFailure

func RunTestAuthenticationWithConfigurationFailure(t *testing.T, signingMethod jwtgo.SigningMethod, certificatePath string, tokenInjector jwt_flow.TokenInjector, configuration func(pluginConfig *traefikPluginOidc.Config, certificate *jwt_certificate.Certificate, ssoAddressTemplate string, issuerUri *url.URL, oidcDiscoveryUri *url.URL, jwksUri *url.URL) *traefikPluginOidc.Config)

func RunTestAuthenticationWithConfigurationSuccess

func RunTestAuthenticationWithConfigurationSuccess(t *testing.T, signingMethod jwtgo.SigningMethod, certificatePath string, tokenInjector jwt_flow.TokenInjector, configuration func(pluginConfig *traefikPluginOidc.Config, certificate *jwt_certificate.Certificate, ssoAddressTemplate string, issuerUri *url.URL, oidcDiscoveryUri *url.URL, jwksUri *url.URL) *traefikPluginOidc.Config)

func RunTestWithClientSecretFailure

func RunTestWithClientSecretFailure(t *testing.T, serverClientSecret string, clientClientSecret string, tokenInjector jwt_flow.TokenInjector)

func RunTestWithClientSecretSuccess

func RunTestWithClientSecretSuccess(t *testing.T, clientSecret string, tokenInjector jwt_flow.TokenInjector)

func RunTestWithDiscoveryFailure

func RunTestWithDiscoveryFailure(t *testing.T, signingMethod jwtgo.SigningMethod, serverCertificatePath string, clientCertificatePath string, setIssuer bool, setOidcDiscoveryUri bool, setJwksUri bool, tokenInjector jwt_flow.TokenInjector)

func RunTestWithDiscoverySuccess

func RunTestWithDiscoverySuccess(t *testing.T, signingMethod jwtgo.SigningMethod, certificatePath string, setIssuer bool, setOidcDiscoveryUri bool, setJwksUri bool, tokenInjector jwt_flow.TokenInjector)

func RunTestWithPublicKeyFailure

func RunTestWithPublicKeyFailure(t *testing.T, signingMethod jwtgo.SigningMethod, publicKeyRootPath string, privateKeyRootPath string, tokenInjector jwt_flow.TokenInjector)

func RunTestWithPublicKeySuccess

func RunTestWithPublicKeySuccess(t *testing.T, signingMethod jwtgo.SigningMethod, certificatePath string, tokenInjector jwt_flow.TokenInjector)

Types

This section is empty.

Jump to

Keyboard shortcuts

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