dex

package
v2.19.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// clientID is the OIDC client ID.
	ClientID string

	// redirectURI is one of the registered (allowed) redirect URLs,
	// used after a successful authentication. Even though there will
	// be no actual redirect to this URL, it needs to be a valid URL.
	RedirectURI string

	// providerURI is the actual Dex root URL ("homepage"), where users
	// can choose which authentication method they'd like to use. In
	// Dex' case, this is "<protocol>://<host>/dex/auth".
	ProviderURI string
	// contains filtered or unexported fields
}

Client is a Dex client that uses Dex' web UI to acquire an ID token.

func NewClient

func NewClient(clientID string, redirectURI string, providerURI string, log *zap.SugaredLogger) (*Client, error)

NewClient creates a new OIDC client. See the Client struct for definitions on the parameters.

func NewClientFromHelmValues

func NewClientFromHelmValues(valuesFile string, clientID string, log *zap.SugaredLogger) (*Client, error)

NewClientFromHelmValues is a helper for e2e tests, reading the hack/ci/testdata/oauth_values.yaml to provide a matching OIDC client. We use this instead of spreading the client ID etc. in tons of shell scripts and env vars.

func (*Client) Login

func (c *Client) Login(ctx context.Context, login string, password string) (string, error)

Jump to

Keyboard shortcuts

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