Documentation ¶
Overview ¶
Package oauth2 implements OAuth2 Device Flow to authenticate machine config download.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ClientID string ClientSecret string Audience string Scopes []string ExtraVariables []string DeviceAuthURL string TokenURL string // contains filtered or unexported fields }
Config represents the OAuth2 configuration.
func NewConfig ¶
NewConfig returns a new Config from cmdline.
If OAuth2 is not configured, it returns os.ErrNotExist.
func (*Config) DeviceAuthFlow ¶
DeviceAuthFlow represents the device auth flow response.
func (*Config) ExtraHeaders ¶
ExtraHeaders returns the extra headers to include in the download request.
Click to show internal directories.
Click to hide internal directories.