Documentation ¶
Index ¶
Constants ¶
View Source
const (
PKCEChallengeMethodS256 = "S256"
)
Variables ¶
View Source
var ErrNotLoggedIn = errors.New("not logged in")
Functions ¶
This section is empty.
Types ¶
type CodeVerifier ¶
type CodeVerifier string
func NewCodeVerifier ¶
func NewCodeVerifier() (CodeVerifier, error)
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 LicenseInfo ¶
type LicenseInfo struct { ID string `json:"id"` // License ID, used to identify the license Description string `json:"description"` // Description for which the license should be used Audiences []string `json:"audiences"` // Cluster IDs that this license can be used with ExpirationDate string `json:"expirationDate"` // ($date-time) the license will expire on Limits interface{} `json:"limits"` // Map of limits determining bound to the license }
type LoginExecutor ¶
type LoginExecutor interface { Worker(ctx context.Context) error Login(ctx context.Context) error LoginAPIKey(ctx context.Context, key string) (bool, error) Logout(ctx context.Context) error GetAPIKey(ctx context.Context, description string) (string, error) GetCloudAPIKey(ctx context.Context, desc string, autoLogin bool) (string, error) GetLicense(ctx context.Context, id string) (string, string, error) GetUserInfo(ctx context.Context, refresh bool) (*authdata.UserInfo, error) GetCloudUserInfo(ctx context.Context, refresh, autoLogin bool) (*authdata.UserInfo, error) }
LoginExecutor controls the execution of a login flow
func NewLoginExecutor ¶
func NewLoginExecutor( saveTokenFunc func(context.Context, *oauth2.Token) error, saveUserInfoFunc func(context.Context, *authdata.UserInfo) error, openURLFunc func(string) error, stdout io.Writer, scout *scout.Reporter, ) LoginExecutor
NewLoginExecutor returns an instance of LoginExecutor
func NewStandardLoginExecutor ¶
func NewStandardLoginExecutor(stdout io.Writer, scout *scout.Reporter) LoginExecutor
Click to show internal directories.
Click to hide internal directories.