Documentation ¶
Index ¶
- func AllProvider() map[provider.OAuth2Provider]provider.ProviderInterface
- func DisableProvider(p provider.OAuth2Provider) error
- func EnableProvider(p provider.OAuth2Provider) error
- func EnabledProvider() *rwmap.RWMap[provider.OAuth2Provider, struct{}]
- func GetProvider(p provider.OAuth2Provider) (provider.ProviderInterface, error)
- func InitProvider(p provider.OAuth2Provider, c provider.Oauth2Option) (provider.ProviderInterface, error)
- func RegisterProvider(ps ...provider.ProviderInterface)
- type BaiduNetDiskProvider
- func (p *BaiduNetDiskProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)
- func (p *BaiduNetDiskProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)
- func (p *BaiduNetDiskProvider) Init(c provider.Oauth2Option)
- func (p *BaiduNetDiskProvider) NewAuthURL(ctx context.Context, state string) (string, error)
- func (p *BaiduNetDiskProvider) Provider() provider.OAuth2Provider
- func (p *BaiduNetDiskProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)
- type BaiduProvider
- func (p *BaiduProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)
- func (p *BaiduProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)
- func (p *BaiduProvider) Init(c provider.Oauth2Option)
- func (p *BaiduProvider) NewAuthURL(ctx context.Context, state string) (string, error)
- func (p *BaiduProvider) Provider() provider.OAuth2Provider
- func (p *BaiduProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)
- type DiscordProvider
- func (p *DiscordProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)
- func (p *DiscordProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)
- func (p *DiscordProvider) Init(c provider.Oauth2Option)
- func (p *DiscordProvider) NewAuthURL(ctx context.Context, state string) (string, error)
- func (p *DiscordProvider) Provider() provider.OAuth2Provider
- func (p *DiscordProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)
- type FormatErrNotImplemented
- type GiteeProvider
- func (p *GiteeProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)
- func (p *GiteeProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)
- func (p *GiteeProvider) Init(c provider.Oauth2Option)
- func (p *GiteeProvider) NewAuthURL(ctx context.Context, state string) (string, error)
- func (p *GiteeProvider) Provider() provider.OAuth2Provider
- func (p *GiteeProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)
- type GithubProvider
- func (p *GithubProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)
- func (p *GithubProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)
- func (p *GithubProvider) Init(c provider.Oauth2Option)
- func (p *GithubProvider) NewAuthURL(ctx context.Context, state string) (string, error)
- func (p *GithubProvider) Provider() provider.OAuth2Provider
- func (p *GithubProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)
- type GitlabProvider
- func (g *GitlabProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)
- func (g *GitlabProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)
- func (g *GitlabProvider) Init(c provider.Oauth2Option)
- func (g *GitlabProvider) NewAuthURL(ctx context.Context, state string) (string, error)
- func (g *GitlabProvider) Provider() provider.OAuth2Provider
- func (g *GitlabProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)
- type GoogleProvider
- func (g *GoogleProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)
- func (g *GoogleProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)
- func (g *GoogleProvider) Init(c provider.Oauth2Option)
- func (g *GoogleProvider) NewAuthURL(ctx context.Context, state string) (string, error)
- func (g *GoogleProvider) Provider() provider.OAuth2Provider
- func (g *GoogleProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)
- type MicrosoftProvider
- func (p *MicrosoftProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)
- func (p *MicrosoftProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)
- func (p *MicrosoftProvider) Init(c provider.Oauth2Option)
- func (p *MicrosoftProvider) NewAuthURL(ctx context.Context, state string) (string, error)
- func (p *MicrosoftProvider) Provider() provider.OAuth2Provider
- func (p *MicrosoftProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)
- type QQProvider
- func (p *QQProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)
- func (p *QQProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)
- func (p *QQProvider) Init(c provider.Oauth2Option)
- func (p *QQProvider) NewAuthURL(ctx context.Context, state string) (string, error)
- func (p *QQProvider) Provider() provider.OAuth2Provider
- func (p *QQProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)
- type XiaomiProvider
- func (p *XiaomiProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)
- func (p *XiaomiProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)
- func (p *XiaomiProvider) Init(c provider.Oauth2Option)
- func (p *XiaomiProvider) NewAuthURL(ctx context.Context, state string) (string, error)
- func (p *XiaomiProvider) Provider() provider.OAuth2Provider
- func (p *XiaomiProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllProvider ¶
func AllProvider() map[provider.OAuth2Provider]provider.ProviderInterface
func DisableProvider ¶
func DisableProvider(p provider.OAuth2Provider) error
func EnableProvider ¶
func EnableProvider(p provider.OAuth2Provider) error
func EnabledProvider ¶
func EnabledProvider() *rwmap.RWMap[provider.OAuth2Provider, struct{}]
func GetProvider ¶
func GetProvider(p provider.OAuth2Provider) (provider.ProviderInterface, error)
func InitProvider ¶
func InitProvider(p provider.OAuth2Provider, c provider.Oauth2Option) (provider.ProviderInterface, error)
func RegisterProvider ¶
func RegisterProvider(ps ...provider.ProviderInterface)
Types ¶
type BaiduNetDiskProvider ¶
type BaiduNetDiskProvider struct {
// contains filtered or unexported fields
}
https://pan.baidu.com/union/apply
func (*BaiduNetDiskProvider) GetUserInfo ¶
func (*BaiduNetDiskProvider) Init ¶
func (p *BaiduNetDiskProvider) Init(c provider.Oauth2Option)
func (*BaiduNetDiskProvider) NewAuthURL ¶
func (*BaiduNetDiskProvider) Provider ¶
func (p *BaiduNetDiskProvider) Provider() provider.OAuth2Provider
func (*BaiduNetDiskProvider) RefreshToken ¶
type BaiduProvider ¶
type BaiduProvider struct {
// contains filtered or unexported fields
}
https://pan.baidu.com/union/apply
func (*BaiduProvider) GetUserInfo ¶
func (*BaiduProvider) Init ¶
func (p *BaiduProvider) Init(c provider.Oauth2Option)
func (*BaiduProvider) NewAuthURL ¶
func (*BaiduProvider) Provider ¶
func (p *BaiduProvider) Provider() provider.OAuth2Provider
func (*BaiduProvider) RefreshToken ¶
type DiscordProvider ¶ added in v0.5.2
type DiscordProvider struct {
// contains filtered or unexported fields
}
func (*DiscordProvider) GetUserInfo ¶ added in v0.5.2
func (*DiscordProvider) Init ¶ added in v0.5.2
func (p *DiscordProvider) Init(c provider.Oauth2Option)
func (*DiscordProvider) NewAuthURL ¶ added in v0.5.2
func (*DiscordProvider) Provider ¶ added in v0.5.2
func (p *DiscordProvider) Provider() provider.OAuth2Provider
func (*DiscordProvider) RefreshToken ¶ added in v0.5.2
type FormatErrNotImplemented ¶
type FormatErrNotImplemented string
func (FormatErrNotImplemented) Error ¶
func (f FormatErrNotImplemented) Error() string
type GiteeProvider ¶
type GiteeProvider struct {
// contains filtered or unexported fields
}
func (*GiteeProvider) GetUserInfo ¶
func (*GiteeProvider) Init ¶
func (p *GiteeProvider) Init(c provider.Oauth2Option)
func (*GiteeProvider) NewAuthURL ¶
func (*GiteeProvider) Provider ¶
func (p *GiteeProvider) Provider() provider.OAuth2Provider
func (*GiteeProvider) RefreshToken ¶
type GithubProvider ¶
type GithubProvider struct {
// contains filtered or unexported fields
}
func (*GithubProvider) GetUserInfo ¶
func (*GithubProvider) Init ¶
func (p *GithubProvider) Init(c provider.Oauth2Option)
func (*GithubProvider) NewAuthURL ¶
func (*GithubProvider) Provider ¶
func (p *GithubProvider) Provider() provider.OAuth2Provider
func (*GithubProvider) RefreshToken ¶
type GitlabProvider ¶
type GitlabProvider struct {
// contains filtered or unexported fields
}
func (*GitlabProvider) GetUserInfo ¶
func (*GitlabProvider) Init ¶
func (g *GitlabProvider) Init(c provider.Oauth2Option)
func (*GitlabProvider) NewAuthURL ¶
func (*GitlabProvider) Provider ¶
func (g *GitlabProvider) Provider() provider.OAuth2Provider
func (*GitlabProvider) RefreshToken ¶
type GoogleProvider ¶
type GoogleProvider struct {
// contains filtered or unexported fields
}
func (*GoogleProvider) GetUserInfo ¶
func (*GoogleProvider) Init ¶
func (g *GoogleProvider) Init(c provider.Oauth2Option)
func (*GoogleProvider) NewAuthURL ¶
func (*GoogleProvider) Provider ¶
func (g *GoogleProvider) Provider() provider.OAuth2Provider
func (*GoogleProvider) RefreshToken ¶
type MicrosoftProvider ¶
type MicrosoftProvider struct {
// contains filtered or unexported fields
}
func (*MicrosoftProvider) GetUserInfo ¶
func (*MicrosoftProvider) Init ¶
func (p *MicrosoftProvider) Init(c provider.Oauth2Option)
func (*MicrosoftProvider) NewAuthURL ¶
func (*MicrosoftProvider) Provider ¶
func (p *MicrosoftProvider) Provider() provider.OAuth2Provider
func (*MicrosoftProvider) RefreshToken ¶
type QQProvider ¶
type QQProvider struct {
// contains filtered or unexported fields
}
func (*QQProvider) GetUserInfo ¶
func (*QQProvider) Init ¶
func (p *QQProvider) Init(c provider.Oauth2Option)
func (*QQProvider) NewAuthURL ¶
func (*QQProvider) Provider ¶
func (p *QQProvider) Provider() provider.OAuth2Provider
func (*QQProvider) RefreshToken ¶
type XiaomiProvider ¶ added in v0.3.1
type XiaomiProvider struct {
// contains filtered or unexported fields
}
func (*XiaomiProvider) GetUserInfo ¶ added in v0.3.1
func (*XiaomiProvider) Init ¶ added in v0.3.1
func (p *XiaomiProvider) Init(c provider.Oauth2Option)
func (*XiaomiProvider) NewAuthURL ¶ added in v0.3.1
func (*XiaomiProvider) Provider ¶ added in v0.3.1
func (p *XiaomiProvider) Provider() provider.OAuth2Provider
func (*XiaomiProvider) RefreshToken ¶ added in v0.3.1
Click to show internal directories.
Click to hide internal directories.