Version: v0.19.0 Latest Latest

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

Go to latest
Published: Aug 26, 2022 License: Apache-2.0 Imports: 17 Imported by: 1



Package conciergeclient provides login helpers for the Pinniped concierge.



View Source
const ErrLoginFailed = constable.Error("login failed")

ErrLoginFailed is returned by Client.ExchangeToken when the concierge server rejects the login request for any reason.


This section is empty.


This section is empty.


type Client

type Client struct {
	// contains filtered or unexported fields

Client is a configuration for talking to the Pinniped concierge.

func New

func New(opts ...Option) (*Client, error)

New validates the specified options and returns a newly initialized *Client.

func (*Client) ExchangeToken

func (c *Client) ExchangeToken(ctx context.Context, token string) (*clientauthenticationv1beta1.ExecCredential, error)

ExchangeToken performs a TokenCredentialRequest against the Pinniped concierge and returns the result as an ExecCredential.

type Option

type Option func(*Client) error

Option is an optional configuration for New().

func WithAPIGroupSuffix added in v0.5.0

func WithAPIGroupSuffix(apiGroupSuffix string) Option

WithAPIGroupSuffix configures the concierge's API group suffix (e.g., "").

func WithAuthenticator

func WithAuthenticator(authType, authName string) Option

WithAuthenticator configures the authenticator reference (spec.authenticator) of the TokenCredentialRequests.

func WithBase64CABundle

func WithBase64CABundle(caBundleBase64 string) Option

WithBase64CABundle configures the base64-encoded, PEM-formatted TLS certificate authority to trust when connecting to the concierge.

func WithCABundle

func WithCABundle(caBundle string) Option

WithCABundle configures the PEM-formatted TLS certificate authority to trust when connecting to the concierge.

func WithEndpoint

func WithEndpoint(endpoint string) Option

WithEndpoint configures the base API endpoint URL of the concierge service (same as Kubernetes API server).

Jump to

Keyboard shortcuts

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