Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client contains an authorized http client. That is, the auth token is automatically set on all request headers.
type Config ¶
type Config struct { // ClientID is the application's ID. ClientID string // ClientSecret is the application's secret. ClientSecret string // AuthorizationURL contains the resource server's authorize endpoint URL AuthorizationURL string // TokenURL contains the resource server's token endpoint URL TokenURL string // Scope specifies optional requested permissions. Scopes []string // CallbackPort specifies which local port to use for the auth callback (default: 8080) CallbackPort int }
Config describes a typical 3-legged OAuth2 flow, with both the client application information and the server's endpoint URLs.
type DefaultTokenStorage ¶ added in v0.1.6
type DefaultTokenStorage struct {
// contains filtered or unexported fields
}
DefaultTokenStorage stores tokens in a user's Home directory
func NewDefaultTokenStorage ¶ added in v0.1.6
func NewDefaultTokenStorage(appName string) *DefaultTokenStorage
NewDefaultTokenStorage returns a configured DefaultTokenStorage with a storage path of ~/.config/{appName}
Click to show internal directories.
Click to hide internal directories.