Documentation ¶
Index ¶
- Variables
- type Config
- type FacebookProvider
- func (provider FacebookProvider) Callback(context *auth.Context)
- func (provider FacebookProvider) ConfigAuth(auth *auth.Auth)
- func (FacebookProvider) GetName() string
- func (provider FacebookProvider) Login(context *auth.Context)
- func (FacebookProvider) Logout(context *auth.Context)
- func (provider FacebookProvider) OAuthConfig(context *auth.Context) *oauth2.Config
- func (provider FacebookProvider) Register(context *auth.Context)
- func (FacebookProvider) ServeHTTP(*auth.Context)
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var UserInfoURL = "https://graph.facebook.com/me?access_token="
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ClientID string ClientSecret string AuthorizeURL string RedirectURL string TokenURL string Scopes []string AuthorizeHandler func(context *auth.Context) (*claims.Claims, error) }
Config facebook Config
type FacebookProvider ¶
type FacebookProvider struct {
*Config
}
FacebookProvider provide login with facebook method
func New ¶
func New(config *Config) *FacebookProvider
func (FacebookProvider) Callback ¶
func (provider FacebookProvider) Callback(context *auth.Context)
Callback implement Callback with facebook provider
func (FacebookProvider) ConfigAuth ¶
func (provider FacebookProvider) ConfigAuth(auth *auth.Auth)
ConfigAuth config auth
func (FacebookProvider) GetName ¶
func (FacebookProvider) GetName() string
GetName return provider name
func (FacebookProvider) Login ¶
func (provider FacebookProvider) Login(context *auth.Context)
Login implemented login with facebook provider
func (FacebookProvider) Logout ¶
func (FacebookProvider) Logout(context *auth.Context)
Logout implemented logout with facebook provider
func (FacebookProvider) OAuthConfig ¶
func (provider FacebookProvider) OAuthConfig(context *auth.Context) *oauth2.Config
OAuthConfig return oauth config based on configuration
func (FacebookProvider) Register ¶
func (provider FacebookProvider) Register(context *auth.Context)
Register implemented register with facebook provider
func (FacebookProvider) ServeHTTP ¶
func (FacebookProvider) ServeHTTP(*auth.Context)
ServeHTTP implement ServeHTTP with facebook provider
type UserInfo ¶
type UserInfo struct { ID string `json:"id"` Name string `json:"name"` GivenName string `json:"first_name"` FamilyName string `json:"last_name"` Picture string `json:"picture"` Profile string `json:"link"` Email string `json:"email"` Gender string `json:"gender"` Locale string `json:"locale"` Verified bool `json:"verified"` }
UserInfo facebook user info structure
Click to show internal directories.
Click to hide internal directories.