Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallbackOutput ¶
type Config ¶
type Config struct {
Enable bool
DisplayName string
RedirectURL string
SsoAddr string
TokenAddr string
UserInfoAddr string
TranTokenMethod string
ClientId string
ClientSecret string
CoverAttributes bool
SkipTlsVerify bool
Attributes struct {
Username string
Nickname string
Phone string
Email string
}
DefaultRoles []string
UserinfoIsArray bool
UserinfoPrefix string
Scopes []string
}
type SsoClient ¶
type SsoClient struct {
Enable bool
Config oauth2.Config
SsoAddr string
UserInfoAddr string
TranTokenMethod string
CallbackAddr string
DisplayName string
CoverAttributes bool
Attributes struct {
Username string
Nickname string
Phone string
Email string
}
UserinfoIsArray bool
UserinfoPrefix string
DefaultRoles []string
Ctx context.Context
sync.RWMutex
}
func (*SsoClient) Callback ¶
func (s *SsoClient) Callback(redis storage.Redis, ctx context.Context, code, state string) (*CallbackOutput, error)
Callback 用 code 兑换 accessToken 以及 用户信息
func (*SsoClient) GetDisplayName ¶
Click to show internal directories.
Click to hide internal directories.