oauth

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2016 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OAuthFacebook

type OAuthFacebook struct {
	Id        string `json:"id"`
	Email     string `json:"email"`
	Name      string `json:"name"`
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Link      string `json:"link"`
	Picture   string `json:"picture"`
	Gender    string `json:"gender"`
	Locale    string `json:"locale"`
	// contains filtered or unexported fields
}

func (*OAuthFacebook) Callback

func (self *OAuthFacebook) Callback(state string, code string) (User, error)

CallBack処理を行う

func (*OAuthFacebook) CheckToken

func (self *OAuthFacebook) CheckToken(client *http.Client, accessToken *facebookAccessToken, facebookToken string) (bool, error)

func (*OAuthFacebook) GenerateLoginUrl

func (self *OAuthFacebook) GenerateLoginUrl() string

リダイレクトURLを作成する

func (*OAuthFacebook) GetClientID

func (self *OAuthFacebook) GetClientID() *string

func (*OAuthFacebook) GetClientSecret

func (self *OAuthFacebook) GetClientSecret() *string

func (*OAuthFacebook) GetEmail

func (self *OAuthFacebook) GetEmail() *string

func (*OAuthFacebook) GetID

func (self *OAuthFacebook) GetID() *int

func (*OAuthFacebook) GetName

func (self *OAuthFacebook) GetName() *string

func (*OAuthFacebook) GetSource

func (self *OAuthFacebook) GetSource() string

type OAuthGithub

type OAuthGithub struct {
	*github.User
}

func (*OAuthGithub) Callback

func (self *OAuthGithub) Callback(state string, code string) (User, error)

CallBack処理を行う

func (*OAuthGithub) GenerateLoginUrl

func (self *OAuthGithub) GenerateLoginUrl() string

リダイレクトURLを作成する

func (*OAuthGithub) GetClientID

func (self *OAuthGithub) GetClientID() *string

func (*OAuthGithub) GetClientSecret

func (self *OAuthGithub) GetClientSecret() *string

func (*OAuthGithub) GetEmail

func (self *OAuthGithub) GetEmail() *string

func (*OAuthGithub) GetID

func (self *OAuthGithub) GetID() *int

func (*OAuthGithub) GetName

func (self *OAuthGithub) GetName() *string

func (*OAuthGithub) GetSource

func (self *OAuthGithub) GetSource() string

type OAuthGoogle

type OAuthGoogle struct {
	Id            string `json:"id"`
	Email         string `json:"email"`
	VerifiedEmail string `json:"verified_email"`
	Name          string `json:"name"`
	GivenName     string `json:"given_name"`
	FamilyName    string `json:"family_name"`
	Link          string `json:"link"`
	Picture       string `json:"picture"`
	Gender        string `json:"gender"`
	Locale        string `json:"locale"`
}

func (*OAuthGoogle) Callback

func (self *OAuthGoogle) Callback(state string, code string) (User, error)

CallBack処理を行う

func (*OAuthGoogle) GenerateLoginUrl

func (self *OAuthGoogle) GenerateLoginUrl() string

リダイレクトURLを作成する

func (*OAuthGoogle) GetClientID

func (self *OAuthGoogle) GetClientID() *string

func (*OAuthGoogle) GetClientSecret

func (self *OAuthGoogle) GetClientSecret() *string

func (*OAuthGoogle) GetEmail

func (self *OAuthGoogle) GetEmail() *string

func (*OAuthGoogle) GetID

func (self *OAuthGoogle) GetID() *int

func (*OAuthGoogle) GetName

func (self *OAuthGoogle) GetName() *string

func (*OAuthGoogle) GetSource

func (self *OAuthGoogle) GetSource() string

type User

type User interface {
	GenerateLoginUrl() string
	GetID() *int
	GetName() *string
	GetEmail() *string
	GetSource() string
	GetClientID() *string
	GetClientSecret() *string
	Callback(state string, code string) (User, error)
}

func NewOAuthFacebook

func NewOAuthFacebook() User

func NewOAuthGitHub

func NewOAuthGitHub() User

func NewOAuthGoogle

func NewOAuthGoogle() User

Jump to

Keyboard shortcuts

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