user_external_login

package
v0.0.0-...-883d24b Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

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)
	GetUserExternalLoginList(ctx context.Context, userID string) (resp []*entity.UserExternalLogin, err error)
	DeleteUserExternalLogin(ctx context.Context, userID, externalID 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,
) *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