Version: v0.0.0-...-e391311 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2015 License: MIT Imports: 11 Imported by: 0




View Source
const (
	// ConfigToken is the key used to store the token under
	ConfigToken = "token"

	// ConfigClientID is the config key used to store the client id
	ConfigClientID = "client_id"

	// ConfigClientSecret is the config key used to store the client secret
	ConfigClientSecret = "client_secret"

	// TitleBarRedirectURL is the OAuth2 redirect URL to use when the authorization
	// code should be returned in the title bar of the browser, with the page text
	// prompting the user to copy the code and paste it in the application.
	TitleBarRedirectURL = "urn:ietf:wg:oauth:2.0:oob"

	// RedirectURL is redirect to local webserver when active
	RedirectURL = "http://" + bindAddress + "/"


This section is empty.


func Config

func Config(name string, config *oauth2.Config) error

Config does the initial creation of the token

It may run an internal webserver to receive the results

func Context

func Context() context.Context

Context returns a context with our HTTP Client baked in for oauth2

func NewClient

func NewClient(name string, config *oauth2.Config) (*http.Client, error)

NewClient gets a token from the config file and configures a Client with it


This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL