auth

package
v2.1.2-rc.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PKCEChallengeMethodS256 = "S256"
)

Variables

This section is empty.

Functions

func EnsureLoggedIn

func EnsureLoggedIn(cmd *cobra.Command) error

EnsureLoggedIn will check if the user is logged in and if not initiate the login flow.

func LoginCommand

func LoginCommand() *cobra.Command

Command returns the telepresence sub-command "auth"

func LogoutCommand

func LogoutCommand() *cobra.Command

Types

type CodeVerifier

type CodeVerifier struct {
	Value string
}

func CreateCodeVerifier

func CreateCodeVerifier() *CodeVerifier

func (*CodeVerifier) CodeChallengePlain

func (v *CodeVerifier) CodeChallengePlain() string

func (*CodeVerifier) CodeChallengeS256

func (v *CodeVerifier) CodeChallengeS256() string

func (*CodeVerifier) String

func (v *CodeVerifier) String() string

type LoginExecutor

type LoginExecutor interface {
	LoginFlow(cmd *cobra.Command) error
}

LoginExecutor controls the execution of a login flow

func NewLoginExecutor

func NewLoginExecutor(oauth2AuthUrl string,
	oauth2TokenUrl string,
	oauth2ClientId string,
	completionUrl string,
	userInfoUrl string,
	saveTokenFunc func(context.Context, *oauth2.Token) error,
	saveUserInfoFunc func(context.Context, *cache.UserInfo) error,
	openURLFunc func(string) error,
	scout *client.Scout) LoginExecutor

NewLoginExecutor returns an instance of LoginExecutor

Jump to

Keyboard shortcuts

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