authclient

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package authclient contains a CLI authentication client for Pomerium.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthClient

type AuthClient struct {
	// contains filtered or unexported fields
}

An AuthClient retrieves an authentication JWT via the Pomerium login API.

func New

func New(options ...Option) *AuthClient

New creates a new AuthClient.

func (*AuthClient) GetJWT

func (client *AuthClient) GetJWT(ctx context.Context, serverURL *url.URL, onOpenBrowser func(string)) (rawJWT string, err error)

GetJWT retrieves a JWT from Pomerium.

type Option

type Option func(*config)

An Option modifies the config.

func WithBrowserCommand

func WithBrowserCommand(browserCommand string) Option

WithBrowserCommand returns an option to configure the browser command.

func WithServiceAccount added in v0.21.0

func WithServiceAccount(serviceAccount string) Option

WithServiceAccount sets the service account in the config.

func WithServiceAccountFile added in v0.21.0

func WithServiceAccountFile(file string) Option

WithServiceAccountFile sets the service account file in the config.

func WithTLSConfig

func WithTLSConfig(tlsConfig *tls.Config) Option

WithTLSConfig returns an option to configure the tls config.

Jump to

Keyboard shortcuts

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