Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEncryptedToken ¶
func Location ¶
Location returns the location of the configuration file. If a configuration file already exists in the HOME directory, it uses that, otherwise it prefers to use the XDG config directory.
func ParseToken ¶
Types ¶
type Config ¶
type Config struct { AccessToken string `json:"access_token,omitempty"` ClientID string `json:"client_id,omitempty"` ClientSecret string `json:"client_secret,omitempty"` Insecure bool `json:"insecure,omitempty"` RefreshToken string `json:"refresh_token,omitempty"` Scopes []string `json:"scopes,omitempty"` TokenURL string `json:"token_url,omitempty"` URL string `json:"url,omitempty"` FedRAMP bool `json:"fedramp,omitempty"` }
Config is the type used to store the configuration of the client.
func Load ¶
Load loads the configuration from the configuration file. If the configuration file doesn't exist it will return an empty configuration object.
func (*Config) Armed ¶
Armed checks if the configuration contains either credentials or tokens that haven't expired, so that it can be used to perform authenticated requests.
func (*Config) Connection ¶
func (c *Config) Connection() (connection *sdk.Connection, err error)
Connection creates a connection using this configuration.
type JWETokenHeader ¶
Click to show internal directories.
Click to hide internal directories.