Versions in this module Expand all Collapse all v1 v1.0.1 Aug 15, 2024 Changes in this version + const OryCompatibleClientId + func HandlePagingUsers(req *apistructs.UserPagingRequest, token OAuthToken) (*common.UserPaging, error) + type Config struct + UCClientID string + UCClientSecret string + type CurrentUser struct + Error interface{} + Result struct{ ... } + Success bool + type Interface common.Interface + type NewClientRequest struct + AccessTokenValiditySeconds int64 + AutoApprove bool + ClientID string + ClientLogoUrl string + ClientName string + ClientSecret string + RefreshTokenValiditySeconds int64 + UserID json.RawMessage + type NewClientResponse struct + AccessToken string + ExpiresIn int64 + Jti string + RefreshToken string + Scope string + TokenType string + type OAuthToken struct + AccessToken string + ExpiresIn int + Jti string + RefreshToken string + Scope string + TokenType string + func GenClientToken(uchost, basic string) (OAuthToken, error) + type TokenClient struct + ClientID string + ClientName string + ID int + type UCTokenAuth struct + ClientID string + ClientSecret string + UCHost string + func NewUCTokenAuth(UCHost, ClientID, ClientSecret string) (*UCTokenAuth, error) + func (a *UCTokenAuth) Auth(token string) (TokenClient, error) + func (a *UCTokenAuth) ExpireServerToken() + func (a *UCTokenAuth) GetServerToken(refresh bool) (OAuthToken, error) + func (a *UCTokenAuth) NewClient(req *NewClientRequest) (*NewClientResponse, error) + type UCUserAuth struct + ClientID string + ClientSecret string + RedirectURI string + UCHost string + UCHostFront string + func NewUCUserAuth(UCHostFront, UCHost, RedirectURI, ClientID, ClientSecret string) *UCUserAuth + func (a *UCUserAuth) GetCurrentUser(headers http.Header) (common.UserInfo, error) + func (a *UCUserAuth) GetUserInfo(oauthToken OAuthToken) (common.UserInfo, error) + func (a *UCUserAuth) Login(uccode string) (OAuthToken, error) + func (a *UCUserAuth) LoginURL(https bool) string + func (a *UCUserAuth) PwdAuth(username, password string) (OAuthToken, error) + type UcUser struct + AvatarURL string + Email string + ID int + Name string + Nick string + Phone string