social

package
v0.0.0-...-fecf105 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2014 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SocialBaseUrl = "/login"
	SocialMap     = make(map[string]Connector)
)

Functions

func NewOauthService

func NewOauthService()

Types

type BasicUserInfo

type BasicUserInfo struct {
	Identity string
	Name     string
	Email    string
}

type Connector

type Connector interface {
	Type() int
	SetRedirectUrl(string)
	UserInfo(*oauth.Token, *url.URL) (*BasicUserInfo, error)

	AuthCodeURL(string) string
	Exchange(string) (*oauth.Token, error)
}

type SocialGithub

type SocialGithub struct {
	Token *oauth.Token
	*oauth.Transport
}

func (*SocialGithub) SetRedirectUrl

func (s *SocialGithub) SetRedirectUrl(url string)

func (*SocialGithub) Type

func (s *SocialGithub) Type() int

func (*SocialGithub) UserInfo

func (s *SocialGithub) UserInfo(token *oauth.Token, _ *url.URL) (*BasicUserInfo, error)

Jump to

Keyboard shortcuts

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