Documentation ¶
Index ¶
- Variables
- type Config
- type WxProvider
- func (provider WxProvider) Callback(context *auth.Context)
- func (provider WxProvider) ConfigAuth(*auth.Auth)
- func (WxProvider) GetName() string
- func (provider WxProvider) Login(context *auth.Context)
- func (WxProvider) Logout(context *auth.Context)
- func (provider WxProvider) OAuthConfig(context *auth.Context) *oauth2.Config
- func (provider WxProvider) Register(context *auth.Context)
- func (WxProvider) 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 WxProvider ¶
type WxProvider struct {
*Config
}
GithubProvider provide login with github method
func New ¶
func New(config *Config) *WxProvider
func (WxProvider) Callback ¶
func (provider WxProvider) Callback(context *auth.Context)
Callback implement Callback with github provider
func (WxProvider) ConfigAuth ¶
func (provider WxProvider) ConfigAuth(*auth.Auth)
ConfigAuth config auth
func (WxProvider) Login ¶
func (provider WxProvider) Login(context *auth.Context)
Login implemented login with github provider
func (WxProvider) Logout ¶
func (WxProvider) Logout(context *auth.Context)
Logout implemented logout with github provider
func (WxProvider) OAuthConfig ¶
func (provider WxProvider) OAuthConfig(context *auth.Context) *oauth2.Config
OAuthConfig return oauth config based on configuration
func (WxProvider) Register ¶
func (provider WxProvider) Register(context *auth.Context)
Register implemented register with github provider
func (WxProvider) ServeHTTP ¶
func (WxProvider) ServeHTTP(*auth.Context)
ServeHTTP implement ServeHTTP with github provider
Click to show internal directories.
Click to hide internal directories.