Documentation ¶
Index ¶
- Variables
- type Config
- type GithubProvider
- func (provider GithubProvider) Callback(context *auth.Context)
- func (provider GithubProvider) ConfigAuth(*auth.Auth)
- func (GithubProvider) GetName() string
- func (provider GithubProvider) Login(context *auth.Context)
- func (GithubProvider) Logout(context *auth.Context)
- func (provider GithubProvider) OAuthConfig(context *auth.Context) *oauth2.Config
- func (provider GithubProvider) Register(context *auth.Context)
- func (GithubProvider) ServeHTTP(*auth.Context)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AuthorizeURL = "https://github.com/login/oauth/authorize" TokenURL = "https://github.com/login/oauth/access_token" )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ClientID string ClientSecret string AuthorizeURL string TokenURL string RedirectURL string Scopes []string AuthorizeHandler func(*auth.Context) (*claims.Claims, error) }
Config github Config
type GithubProvider ¶
type GithubProvider struct {
*Config
}
GithubProvider provide login with github method
func New ¶
func New(config *Config) *GithubProvider
func (GithubProvider) Callback ¶
func (provider GithubProvider) Callback(context *auth.Context)
Callback implement Callback with github provider
func (GithubProvider) ConfigAuth ¶
func (provider GithubProvider) ConfigAuth(*auth.Auth)
ConfigAuth config auth
func (GithubProvider) Login ¶
func (provider GithubProvider) Login(context *auth.Context)
Login implemented login with github provider
func (GithubProvider) Logout ¶
func (GithubProvider) Logout(context *auth.Context)
Logout implemented logout with github provider
func (GithubProvider) OAuthConfig ¶
func (provider GithubProvider) OAuthConfig(context *auth.Context) *oauth2.Config
OAuthConfig return oauth config based on configuration
func (GithubProvider) Register ¶
func (provider GithubProvider) Register(context *auth.Context)
Register implemented register with github provider
func (GithubProvider) ServeHTTP ¶
func (GithubProvider) ServeHTTP(*auth.Context)
ServeHTTP implement ServeHTTP with github provider
Click to show internal directories.
Click to hide internal directories.