Documentation
¶
Index ¶
Constants ¶
View Source
const ( // EndpointAuthURL 构建用户授权地址的请求地址 EndpointAuthURL = "https://www.facebook.com/v21.0/dialog/oauth" // EndpointTokenURL 交换用户授权的 access_token 的请求地址 EndpointTokenURL = "https://graph.facebook.com/v21.0/oauth/access_token" // EndpointUserInfo 获取用户信息的请求地址 EndpointUserInfo = "https://graph.facebook.com/me" )
View Source
const ( ScopeEmail = "email" // 用户邮箱 ScopePublicProfile = "public_profile" // 用户公开信息 )
View Source
const (
OAuthUrlIdentifierKey = "facebook.oauth2.url.identifier.%s"
)
Variables ¶
This section is empty.
Functions ¶
func GetOAuthURLIdentifierKey ¶ added in v0.5.17
Types ¶
type OAuth ¶
type OAuth struct {
// contains filtered or unexported fields
}
func (*OAuth) BuildAuthPageURL ¶ added in v0.5.17
BuildAuthPageURL 构建授权页面 URL
func (*OAuth) HandleOAuth2ByAPPAuthToken ¶ added in v0.5.17
HandleOAuth2ByAPPAuthToken 处理 APP 授权登录
func (*OAuth) HandleOAuth2ByAuthCode ¶ added in v0.5.17
HandleOAuth2ByAuthCode 处理授权码登录授权
type Option ¶
type Option func(o *Options)
func WithClientID ¶
func WithClientSecret ¶
func WithRedirectURL ¶
Click to show internal directories.
Click to hide internal directories.