Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlipayProvider ¶
type AlipayProvider struct {
// contains filtered or unexported fields
}
AlipayProvider 支付宝登录提供者
func NewAlipayProvider ¶
func NewAlipayProvider(clientID, clientSecret, redirectURL string, scopes []string, opts ...AlipayOption) *AlipayProvider
NewAlipayProvider 创建支付宝提供者
func (*AlipayProvider) AuthCodeURL ¶
func (p *AlipayProvider) AuthCodeURL(state string, opts ...oauth.AuthCodeOption) string
AuthCodeURL 重写授权URL生成方法,适配支付宝特殊需求
func (*AlipayProvider) GetOAuth2Config ¶
func (p *AlipayProvider) GetOAuth2Config() oauth.OAuth2Config
GetOAuth2Config 实现Provider接口
func (*AlipayProvider) GetUserInfo ¶
func (p *AlipayProvider) GetUserInfo(ctx context.Context, token *oauth.Token) (*social.UserInfo, error)
GetUserInfo 实现Provider接口
type GitHubProvider ¶
type GitHubProvider struct {
// contains filtered or unexported fields
}
GitHubProvider GitHub登录提供者
func NewGitHubProvider ¶
func NewGitHubProvider(clientID, clientSecret, redirectURL string, scopes []string) *GitHubProvider
NewGitHubProvider 创建GitHub提供者
func (*GitHubProvider) GetOAuth2Config ¶
func (p *GitHubProvider) GetOAuth2Config() oauth.OAuth2Config
GetOAuth2Config 实现Provider接口
func (*GitHubProvider) GetUserInfo ¶
func (p *GitHubProvider) GetUserInfo(ctx context.Context, token *oauth.Token) (*social.UserInfo, error)
GetUserInfo 实现Provider接口
type GoogleProvider ¶
type GoogleProvider struct {
// contains filtered or unexported fields
}
GoogleProvider Google登录提供者
func NewGoogleProvider ¶
func NewGoogleProvider(clientID, clientSecret, redirectURL string, scopes []string) *GoogleProvider
NewGoogleProvider 创建Google提供者
func (*GoogleProvider) GetOAuth2Config ¶
func (p *GoogleProvider) GetOAuth2Config() oauth.OAuth2Config
GetOAuth2Config 实现Provider接口
func (*GoogleProvider) GetUserInfo ¶
func (p *GoogleProvider) GetUserInfo(ctx context.Context, token *oauth.Token) (*social.UserInfo, error)
GetUserInfo 实现Provider接口
type WechatProvider ¶
type WechatProvider struct {
// contains filtered or unexported fields
}
WechatProvider 微信登录提供者
func NewWechatProvider ¶
func NewWechatProvider(clientID, clientSecret, redirectURL string, scopes []string, opts ...WechatOption) *WechatProvider
NewWechatProvider 创建微信提供者
func (*WechatProvider) AuthCodeURL ¶
func (p *WechatProvider) AuthCodeURL(state string, opts ...oauth.AuthCodeOption) string
AuthCodeURL 重写授权URL生成方法,适配微信特殊需求
func (*WechatProvider) GetOAuth2Config ¶
func (p *WechatProvider) GetOAuth2Config() oauth.OAuth2Config
GetOAuth2Config 实现Provider接口
func (*WechatProvider) GetUserInfo ¶
func (p *WechatProvider) GetUserInfo(ctx context.Context, token *oauth.Token) (*social.UserInfo, error)
GetUserInfo 实现Provider接口
Click to show internal directories.
Click to hide internal directories.