oauth

package
v0.0.0-...-4e86a80 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROVIDER_GITHUB       = "github"
	PROVIDER_DIGITALOCEAN = "digitalocean"
)

Variables

View Source
var DOEndpoint = oauth2.Endpoint{
	AuthURL:  "https://cloud.digitalocean.com/v1/oauth/authorize",
	TokenURL: "https://cloud.digitalocean.com/v1/oauth/token",
}

Endpoint is DigitalOcean's OAuth 2.0 endpoint.

Functions

This section is empty.

Types

type AccountReader

type AccountReader interface {
	Email() (*string, error)
	Username() (*string, error)
	Name() (*string, error)
	Avatar() (*string, error)
	Data() (interface{}, error)
	Token(authCode string) (*oauth2.Token, error)
}

AccountReader type abstracts how data is retrieved from different providers

func MakeReader

func MakeReader(provider string) (AccountReader, error)

MakeReader creates reader based on requested provider

Jump to

Keyboard shortcuts

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