auth

package
v0.0.0-...-6740b9f Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2014 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProjectId          string = ""
	ProjectClientId    string = ""
	ProjectClientEmail string = ""
)
View Source
const (
	AuthScope    string = "https://www.googleapis.com/auth/devstorage.read_write"
	AuthTokenURI string = "https://accounts.google.com/o/oauth2/token"
)
View Source
const (
	TokenCacheKey string = "oauth-token"
)

Variables

View Source
var (
	AuthPrivateKey = []byte(``)
)

Functions

This section is empty.

Types

type Auth

type Auth struct {
	AppEngineContext appengine.Context
	// contains filtered or unexported fields
}

func NewAuth

func NewAuth(appEngineContext appengine.Context, config *Config) *Auth

func (*Auth) Do

func (self *Auth) Do(request *http.Request) (*http.Response, error)

func (*Auth) NewOAuth2Request

func (self *Auth) NewOAuth2Request(method, url string, body io.Reader) (*http.Request, string, error)

type Config

type Config struct {
	ProjectId          string
	ProjectClientEmail string
	AuthScope          string
	AuthTokenURI       string
	AuthPrivateKey     []byte
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(client *http.Client) *Config

func (*Config) WithAuthPrivateKey

func (self *Config) WithAuthPrivateKey(authPrivateKey []byte) *Config

func (*Config) WithAuthScope

func (self *Config) WithAuthScope(authScope string) *Config

func (*Config) WithAuthTokenURI

func (self *Config) WithAuthTokenURI(authTokenURI string) *Config

func (*Config) WithProjectClientEmail

func (self *Config) WithProjectClientEmail(projectClientEmail string) *Config

func (*Config) WithProjectId

func (self *Config) WithProjectId(projectId string) *Config

Jump to

Keyboard shortcuts

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