Documentation
¶
Index ¶
- func CallbackHandler(ctx context.Context)
- func Redirect(ctx context.Context)
- func SaveAccount(providerName string, account Account) error
- type Account
- type AccountGetter
- type Config
- type OAuth
- func (o *OAuth) Config() interface{}
- func (o *OAuth) ConfigHelp() string
- func (o *OAuth) Fulfilled() bool
- func (o *OAuth) GoConfig(scopes []string) oauth2.Config
- func (o *OAuth) Init(providerName string)
- func (o *OAuth) Name() string
- func (o *OAuth) RedirectURL() string
- func (o *OAuth) SetConfig(c interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallbackHandler ¶
func SaveAccount ¶
Types ¶
type Account ¶
type Account struct {
Id string `json:"id"`
Token *oauth2.Token `json:"-"`
Scopes []string `json:"scopes"`
Name string `json:"name"`
ImageURL string `json:"image_url"`
}
func GetAccount ¶
type OAuth ¶
type OAuth struct {
ProviderName string
Endpoint oauth2.Endpoint
ConfigHelpTemplate string
GatAccount AccountGetter
// contains filtered or unexported fields
}
func (*OAuth) ConfigHelp ¶
func (*OAuth) RedirectURL ¶
Click to show internal directories.
Click to hide internal directories.