dextest

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2019 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stop

func Stop(server *TestDex)

Stop shuts down the server and blocks until all outstanding requests on this server have completed.

Types

type TestDex

type TestDex struct {
	Environment string
	DexCA       string
	// contains filtered or unexported fields
}

TestDex represents a Dex server instance used for testing.

func Restart added in v1.5.0

func Restart(server *TestDex) (*TestDex, error)

Restart starts a new dex server using the provided server for configuration.

func Start added in v1.4.0

func Start(testDir string, port int32, environment string, ldap *ldaptest.TestLDAP) (*TestDex, error)

Start starts a new dex server. It uses the ldapConfig to setup its connector.

func StartDexes

func StartDexes(testDir string, ldap *ldaptest.TestLDAP, environments []string, portsFrom int32) ([]*TestDex, error)

StartDexes creates one dex test server per environment provided, using the same ldap instance as a connector It will stop creating any more dex servers on the firs error encountered, and return the created ones so far.

func (*TestDex) RegisterClient

func (d *TestDex) RegisterClient(id, secret, redirectURL, name string)

RegisterClient adds a new client to the Dex server.

func (*TestDex) URL

func (d *TestDex) URL() string

URL returns the base URL of the Dex server.

Jump to

Keyboard shortcuts

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