Documentation ¶
Index ¶
- Constants
- func GetApplicationInfo(appName string) (*casdoorsdk.Application, error)
- func GetCasdoorEndPoint() string
- type CasdoorConfig
- type GopAccountClient
- func (c GopAccountClient) GetProviderBindStatus() ProviderBindsStatus
- func (c *GopAccountClient) GetProviderWeChatQRCode(providerId string) (qrData, tickt string, err error)
- func (c *GopAccountClient) GetProviders() []*casdoorsdk.ProviderItem
- func (c GopAccountClient) GetUser() (*casdoorsdk.User, error)
- func (c GopAccountClient) GetUserSimple() *UserSimple
- func (p GopAccountClient) UnLink(provider string) bool
- type ProviderBindsStatus
- type UserSimple
Constants ¶
View Source
const ( ProviderFacebook = "Facebook" ProviderTwitter = "Twitter" ProviderGitHub = "GitHub" ProviderWeChat = "WeChat" )
provider name
Variables ¶
This section is empty.
Functions ¶
func GetApplicationInfo ¶
func GetApplicationInfo(appName string) (*casdoorsdk.Application, error)
获取当前应用
func GetCasdoorEndPoint ¶ added in v1.2.0
func GetCasdoorEndPoint() string
Types ¶
type CasdoorConfig ¶
type CasdoorConfig struct {
// contains filtered or unexported fields
}
func CasdoorConfigInit ¶
func CasdoorConfigInit() *CasdoorConfig
type GopAccountClient ¶
type GopAccountClient struct { AccessToken string Claim *casdoorsdk.Claims }
Casdoor user session
func GetClient ¶
func GetClient(token string) (*GopAccountClient, error)
func (GopAccountClient) GetProviderBindStatus ¶
func (c GopAccountClient) GetProviderBindStatus() ProviderBindsStatus
Get Current User Provider binding status
func (*GopAccountClient) GetProviderWeChatQRCode ¶ added in v1.2.0
func (c *GopAccountClient) GetProviderWeChatQRCode(providerId string) (qrData, tickt string, err error)
func (*GopAccountClient) GetProviders ¶ added in v1.2.0
func (c *GopAccountClient) GetProviders() []*casdoorsdk.ProviderItem
get current user application providers
func (GopAccountClient) GetUser ¶
func (c GopAccountClient) GetUser() (*casdoorsdk.User, error)
func (GopAccountClient) GetUserSimple ¶
func (c GopAccountClient) GetUserSimple() *UserSimple
Get UserInfo from access token
func (GopAccountClient) UnLink ¶
func (p GopAccountClient) UnLink(provider string) bool
Unbind provider
providerName: lookup provider.go
Click to show internal directories.
Click to hide internal directories.