Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliyunIDaaS ¶
type AliyunIDaaS struct {
// ClientID is the application's ID.
ClientID string `json:"clientID" yaml:"clientID"`
// ClientSecret is the application's secret.
ClientSecret string `json:"-" yaml:"clientSecret"`
// Endpoint contains the resource server's token endpoint
// URLs. These are constants specific to each server and are
// often available via site-specific packages, such as
// google.Endpoint or github.Endpoint.
Endpoint Endpoint `json:"endpoint" yaml:"endpoint"`
// RedirectURL is the URL to redirect users going through
// the OAuth flow, after the resource owner's URLs.
RedirectURL string `json:"redirectURL" yaml:"redirectURL"`
// Scope specifies optional requested permissions.
Scopes []string `json:"scopes" yaml:"scopes"`
}
func (*AliyunIDaaS) IdentityExchange ¶
func (g *AliyunIDaaS) IdentityExchange(code string) (identityprovider.Identity, error)
func (*AliyunIDaaS) Setup ¶
func (a *AliyunIDaaS) Setup(options *oauth.DynamicOptions) (identityprovider.OAuthProvider, error)
func (*AliyunIDaaS) Type ¶
func (a *AliyunIDaaS) Type() string
type Endpoint ¶
type Endpoint struct {
AuthURL string `json:"authURL" yaml:"authURL"`
TokenURL string `json:"tokenURL" yaml:"tokenURL"`
UserInfoURL string `json:"user_info_url" yaml:"userInfoUrl"`
}
Endpoint represents an OAuth 2.0 provider's authorization and token endpoint URLs.
type IDaaSIdentity ¶
type IDaaSIdentity struct {
Sub string `json:"sub"`
OuID string `json:"ou_id"`
Nickname string `json:"nickname"`
PhoneNumber string `json:"phone_number"`
OuName string `json:"ou_name"`
Email string `json:"email"`
Username string `json:"username"`
}
func (IDaaSIdentity) GetEmail ¶
func (a IDaaSIdentity) GetEmail() string
func (IDaaSIdentity) GetName ¶
func (a IDaaSIdentity) GetName() string
type UserInfoResp ¶
type UserInfoResp struct {
Success bool `json:"success"`
Message string `json:"message"`
Code string `json:"code"`
IDaaSIdentity IDaaSIdentity `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.