flows

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 11 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 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