flows

package
v0.15.6 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package flows has helper functions for working with pomerium end-user use-case flows.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(ctx context.Context, client *http.Client, url *url.URL, options ...AuthenticateOption) (*http.Response, error)

Authenticate submits a request to a URL, expects a redirect to authenticate and then openid and logs in. Finally it expects to redirect back to the original page.

Types

type AuthenticateOption

type AuthenticateOption func(cfg *authenticateConfig)

An AuthenticateOption is an option for authentication.

func WithAPI

func WithAPI() AuthenticateOption

WithAPI tells authentication to use API authentication flow.

func WithEmail

func WithEmail(email string) AuthenticateOption

WithEmail sets the email to use.

func WithForwardAuth

func WithForwardAuth(fa bool) AuthenticateOption

WithForwardAuth enables/disables forward auth.

func WithGroups

func WithGroups(groups ...string) AuthenticateOption

WithGroups sets the groups to use.

func WithTokenExpiration

func WithTokenExpiration(tokenExpiration time.Duration) AuthenticateOption

WithTokenExpiration sets the token expiration.

Jump to

Keyboard shortcuts

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