providers

package
v0.7.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 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) GetToken

func (p *BaiduNetDiskProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)

func (*BaiduNetDiskProvider) GetUserInfo

func (p *BaiduNetDiskProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)

func (*BaiduNetDiskProvider) Init

func (*BaiduNetDiskProvider) NewAuthURL

func (p *BaiduNetDiskProvider) NewAuthURL(ctx context.Context, state string) (string, error)

func (*BaiduNetDiskProvider) Provider

func (*BaiduNetDiskProvider) RefreshToken

func (p *BaiduNetDiskProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)

type BaiduProvider

type BaiduProvider struct {
	// contains filtered or unexported fields
}

https://pan.baidu.com/union/apply

func (*BaiduProvider) GetToken

func (p *BaiduProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)

func (*BaiduProvider) GetUserInfo

func (p *BaiduProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)

func (*BaiduProvider) Init

func (p *BaiduProvider) Init(c provider.Oauth2Option)

func (*BaiduProvider) NewAuthURL

func (p *BaiduProvider) NewAuthURL(ctx context.Context, state string) (string, error)

func (*BaiduProvider) Provider

func (p *BaiduProvider) Provider() provider.OAuth2Provider

func (*BaiduProvider) RefreshToken

func (p *BaiduProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)

type DiscordProvider added in v0.5.2

type DiscordProvider struct {
	// contains filtered or unexported fields
}

func (*DiscordProvider) GetToken added in v0.5.2

func (p *DiscordProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)

func (*DiscordProvider) GetUserInfo added in v0.5.2

func (p *DiscordProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)

func (*DiscordProvider) Init added in v0.5.2

func (*DiscordProvider) NewAuthURL added in v0.5.2

func (p *DiscordProvider) NewAuthURL(ctx context.Context, state string) (string, error)

func (*DiscordProvider) Provider added in v0.5.2

func (p *DiscordProvider) Provider() provider.OAuth2Provider

func (*DiscordProvider) RefreshToken added in v0.5.2

func (p *DiscordProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)

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) GetToken

func (p *GiteeProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)

func (*GiteeProvider) GetUserInfo

func (p *GiteeProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)

func (*GiteeProvider) Init

func (p *GiteeProvider) Init(c provider.Oauth2Option)

func (*GiteeProvider) NewAuthURL

func (p *GiteeProvider) NewAuthURL(ctx context.Context, state string) (string, error)

func (*GiteeProvider) Provider

func (p *GiteeProvider) Provider() provider.OAuth2Provider

func (*GiteeProvider) RefreshToken

func (p *GiteeProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)

type GithubProvider

type GithubProvider struct {
	// contains filtered or unexported fields
}

func (*GithubProvider) GetToken

func (p *GithubProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)

func (*GithubProvider) GetUserInfo

func (p *GithubProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)

func (*GithubProvider) Init

func (*GithubProvider) NewAuthURL

func (p *GithubProvider) NewAuthURL(ctx context.Context, state string) (string, error)

func (*GithubProvider) Provider

func (p *GithubProvider) Provider() provider.OAuth2Provider

func (*GithubProvider) RefreshToken

func (p *GithubProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)

type GitlabProvider

type GitlabProvider struct {
	// contains filtered or unexported fields
}

func (*GitlabProvider) GetToken

func (g *GitlabProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)

func (*GitlabProvider) GetUserInfo

func (g *GitlabProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)

func (*GitlabProvider) Init

func (*GitlabProvider) NewAuthURL

func (g *GitlabProvider) NewAuthURL(ctx context.Context, state string) (string, error)

func (*GitlabProvider) Provider

func (g *GitlabProvider) Provider() provider.OAuth2Provider

func (*GitlabProvider) RefreshToken

func (g *GitlabProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)

type GoogleProvider

type GoogleProvider struct {
	// contains filtered or unexported fields
}

func (*GoogleProvider) GetToken

func (g *GoogleProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)

func (*GoogleProvider) GetUserInfo

func (g *GoogleProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)

func (*GoogleProvider) Init

func (*GoogleProvider) NewAuthURL

func (g *GoogleProvider) NewAuthURL(ctx context.Context, state string) (string, error)

func (*GoogleProvider) Provider

func (g *GoogleProvider) Provider() provider.OAuth2Provider

func (*GoogleProvider) RefreshToken

func (g *GoogleProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)

type MicrosoftProvider

type MicrosoftProvider struct {
	// contains filtered or unexported fields
}

func (*MicrosoftProvider) GetToken

func (p *MicrosoftProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)

func (*MicrosoftProvider) GetUserInfo

func (p *MicrosoftProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)

func (*MicrosoftProvider) Init

func (*MicrosoftProvider) NewAuthURL

func (p *MicrosoftProvider) NewAuthURL(ctx context.Context, state string) (string, error)

func (*MicrosoftProvider) Provider

func (*MicrosoftProvider) RefreshToken

func (p *MicrosoftProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)

type QQProvider

type QQProvider struct {
	// contains filtered or unexported fields
}

func (*QQProvider) GetToken

func (p *QQProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)

func (*QQProvider) GetUserInfo

func (p *QQProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)

func (*QQProvider) Init

func (p *QQProvider) Init(c provider.Oauth2Option)

func (*QQProvider) NewAuthURL

func (p *QQProvider) NewAuthURL(ctx context.Context, state string) (string, error)

func (*QQProvider) Provider

func (p *QQProvider) Provider() provider.OAuth2Provider

func (*QQProvider) RefreshToken

func (p *QQProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)

type XiaomiProvider added in v0.3.1

type XiaomiProvider struct {
	// contains filtered or unexported fields
}

func (*XiaomiProvider) GetToken added in v0.3.1

func (p *XiaomiProvider) GetToken(ctx context.Context, code string) (*oauth2.Token, error)

func (*XiaomiProvider) GetUserInfo added in v0.3.1

func (p *XiaomiProvider) GetUserInfo(ctx context.Context, code string) (*provider.UserInfo, error)

func (*XiaomiProvider) Init added in v0.3.1

func (*XiaomiProvider) NewAuthURL added in v0.3.1

func (p *XiaomiProvider) NewAuthURL(ctx context.Context, state string) (string, error)

func (*XiaomiProvider) Provider added in v0.3.1

func (p *XiaomiProvider) Provider() provider.OAuth2Provider

func (*XiaomiProvider) RefreshToken added in v0.3.1

func (p *XiaomiProvider) RefreshToken(ctx context.Context, tk string) (*oauth2.Token, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL