Documentation
¶
Index ¶
- func DefaultScopes() []string
- type Config
- type Provider
- func (p *Provider) AuthCodeURL(state string, opts ...social.AuthCodeOption) string
- func (p *Provider) Exchange(ctx context.Context, code string, opts ...social.ExchangeOption) (*social.Token, error)
- func (p *Provider) Name() string
- func (p *Provider) RefreshToken(ctx context.Context, refreshToken string) (*social.Token, error)
- func (p *Provider) UserInfo(ctx context.Context, token *social.Token) (*social.SocialProfile, error)
- func (p *Provider) ValidateToken(ctx context.Context, token *social.Token) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
ClientID string
ClientSecret string
CallbackURL string
Scopes []string
AuthURL string
TokenURL string
UserURL string
EmailsURL string
HTTPClient *http.Client
AllowInsecureLoopback bool
}
Config holds GitHub OAuth configuration.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements social.SocialProvider for GitHub.
func (*Provider) AuthCodeURL ¶
func (p *Provider) AuthCodeURL(state string, opts ...social.AuthCodeOption) string
AuthCodeURL implements social.SocialProvider.
func (*Provider) Exchange ¶
func (p *Provider) Exchange(ctx context.Context, code string, opts ...social.ExchangeOption) (*social.Token, error)
Exchange implements social.SocialProvider.
func (*Provider) RefreshToken ¶
RefreshToken implements social.SocialProvider. GitHub tokens don't expire and can't be refreshed.
Click to show internal directories.
Click to hide internal directories.