user_external_login

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserCenterLoginService

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

UserCenterLoginService user external login service

func NewUserCenterLoginService

func NewUserCenterLoginService(
	userRepo usercommon.UserRepo,
	userCommonService *usercommon.UserCommon,
	userExternalLoginRepo UserExternalLoginRepo,
	userActivity activity.UserActiveActivityRepo,
	siteInfoCommonService siteinfo_common.SiteInfoCommonService,
) *UserCenterLoginService

NewUserCenterLoginService new user external login service

func (*UserCenterLoginService) ExternalLogin

func (us *UserCenterLoginService) ExternalLogin(
	ctx context.Context, userCenter plugin.UserCenter, basicUserInfo *plugin.UserCenterBasicUserInfo) (
	resp *schema.UserExternalLoginResp, err error)

func (*UserCenterLoginService) UserCenterAdminFunctionAgent

func (us *UserCenterLoginService) UserCenterAdminFunctionAgent(ctx context.Context) (
	resp *schema.UserCenterAdminFunctionAgentResp, err error)

UserCenterAdminFunctionAgent Check in the backend administration interface if the user-related functions are turned off due to turning on the User Center plugin.

func (*UserCenterLoginService) UserCenterPersonalBranding

func (us *UserCenterLoginService) UserCenterPersonalBranding(ctx context.Context, username string) (
	resp *schema.UserCenterPersonalBranding, err error)

func (*UserCenterLoginService) UserCenterUserSettings

func (us *UserCenterLoginService) UserCenterUserSettings(ctx context.Context, userID string) (
	resp *schema.UserCenterUserSettingsResp, err error)

type UserExternalLoginRepo

type UserExternalLoginRepo interface {
	AddUserExternalLogin(ctx context.Context, user *entity.UserExternalLogin) (err error)
	UpdateInfo(ctx context.Context, userInfo *entity.UserExternalLogin) (err error)
	GetByExternalID(ctx context.Context, provider, externalID string) (userInfo *entity.UserExternalLogin, exist bool, err error)
	GetByUserID(ctx context.Context, provider, userID string) (userInfo *entity.UserExternalLogin, exist bool, err error)
	GetUserExternalLoginList(ctx context.Context, userID string) (resp []*entity.UserExternalLogin, err error)
	DeleteUserExternalLogin(ctx context.Context, userID, externalID string) (err error)
	DeleteUserExternalLoginByUserID(ctx context.Context, userID string) (err error)
	SetCacheUserExternalLoginInfo(ctx context.Context, key string, info *schema.ExternalLoginUserInfoCache) (err error)
	GetCacheUserExternalLoginInfo(ctx context.Context, key string) (info *schema.ExternalLoginUserInfoCache, err error)
}

type UserExternalLoginService

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

UserExternalLoginService user external login service

func NewUserExternalLoginService

func NewUserExternalLoginService(
	userRepo usercommon.UserRepo,
	userCommonService *usercommon.UserCommon,
	userExternalLoginRepo UserExternalLoginRepo,
	emailService *export.EmailService,
	siteInfoCommonService siteinfo_common.SiteInfoCommonService,
	userActivity activity.UserActiveActivityRepo,
	userNotificationConfigService *user_notification_config.UserNotificationConfigService,
) *UserExternalLoginService

NewUserExternalLoginService new user external login service

func (*UserExternalLoginService) CheckUserStatusInUserCenter

func (us *UserExternalLoginService) CheckUserStatusInUserCenter(ctx context.Context, userID string) (
	valid bool, externalID string, err error)

CheckUserStatusInUserCenter check user status in user center

func (*UserExternalLoginService) ExternalLogin

func (us *UserExternalLoginService) ExternalLogin(
	ctx context.Context, externalUserInfo *schema.ExternalLoginUserInfoCache) (
	resp *schema.UserExternalLoginResp, err error)

ExternalLogin if user is already a member logged in

func (*UserExternalLoginService) ExternalLoginBindingUser

func (us *UserExternalLoginService) ExternalLoginBindingUser(
	ctx context.Context, bindingKey string, oldUserInfo *entity.User) (err error)

ExternalLoginBindingUser The user clicks on the email link of the bound account and requests the API to bind the user officially

func (*UserExternalLoginService) ExternalLoginBindingUserSendEmail

ExternalLoginBindingUserSendEmail Send an email for third-party account login for binding user

func (*UserExternalLoginService) ExternalLoginUnbinding

func (us *UserExternalLoginService) ExternalLoginUnbinding(
	ctx context.Context, req *schema.ExternalLoginUnbindingReq) (resp any, err error)

ExternalLoginUnbinding external login unbinding

func (*UserExternalLoginService) GetExternalLoginUserInfoList

func (us *UserExternalLoginService) GetExternalLoginUserInfoList(
	ctx context.Context, userID string) (resp []*entity.UserExternalLogin, err error)

GetExternalLoginUserInfoList get external login user info list

Jump to

Keyboard shortcuts

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