Documentation ¶
Index ¶
- Constants
- type AuthCredentials
- type DeviceFlow
- type OAuth
- func (a *OAuth) ConfirmForgotPassword(ctx context.Context, email string, newPassword string, ...) error
- func (a *OAuth) ConfirmUser(ctx context.Context, username, code string) error
- func (a *OAuth) ForgotPassword(ctx context.Context, email string) error
- func (a *OAuth) Login(ctx context.Context, ws secrets.WriteSecrets) error
- func (a *OAuth) Logout(ctx context.Context, provider string, ws secrets.WriteSecrets) error
- func (a *OAuth) Register(ctx context.Context, username, password, confirmPassword string) error
- func (a *OAuth) ResendVerification(ctx context.Context, email string) error
- func (a *OAuth) Status(ctx context.Context, skipAuthCheck bool, rs secrets.ReadSecrets)
- func (a *OAuth) Tokens(ctx context.Context, rs secrets.ReadSecrets) []string
Constants ¶
View Source
const ( // Lekko CLI client ID. Used for oauth with lekko. LekkoClientID string = "v0.303976a05d96c02eee5b1a75a3923815d82599b0" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthCredentials ¶
type DeviceFlow ¶
type DeviceFlow struct {
// contains filtered or unexported fields
}
DeviceFlow initiates the OAuth 2.0 device authorization flow with Lekko.
func NewDeviceFlow ¶
func NewDeviceFlow(lekkoURL string) *DeviceFlow
func (*DeviceFlow) Authorize ¶
func (f *DeviceFlow) Authorize(ctx context.Context) (*AuthCredentials, error)
type OAuth ¶
type OAuth struct {
// contains filtered or unexported fields
}
OAuth is responsible for managing all of the authentication credentials and settings on the CLI.
func NewOAuth ¶
func NewOAuth(bff bffv1beta1connect.BFFServiceClient) *OAuth
Returns an OAuth object, responsible for managing oauth on the local FS. This is meant to be used by the cli on the user's local filesystem.
func (*OAuth) ConfirmForgotPassword ¶ added in v0.2.18
func (*OAuth) ConfirmUser ¶ added in v0.2.14
func (*OAuth) ForgotPassword ¶ added in v0.2.18
func (*OAuth) Login ¶
Login will attempt to read any existing lekko and github credentials from disk. If either of those credentials don't exist, or are expired, we will reinitiate oauath with that provider.
func (*OAuth) Logout ¶
Logout implicitly expires the relevant credentials by deleting them. TODO: explore explicitly expiring these credentials with each provider.
func (*OAuth) ResendVerification ¶ added in v0.2.18
Click to show internal directories.
Click to hide internal directories.