Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Lekko CLI client ID. Used for oauth with lekko. LekkoClientID string = "v0.303976a05d96c02eee5b1a75a3923815d82599b0" // Relevant headers used for auth with lekko. LekkoTeamHeaderKey string = "X-Lekko-Team" GithubOAuthHeaderKey string = "X-Github-Token" GithubUserHeaderKey string = "X-Github-User" AuthorizationHeaderKey string = "Authorization" LekkoURL string = "https://prod.api.lekko.dev" )
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 ¶
OAuth is responsible for managing all of the authentication credentials and settings on the CLI.
func NewOAuth ¶
func NewOAuth() *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) 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.
Click to show internal directories.
Click to hide internal directories.