package authprovider import ( "errors" "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/auth2" "git.rosy.net.cn/jx-callback/business/model" "git.rosy.net.cn/jx-callback/business/model/dao" ) type DefAuther struct { } // 此函数为空 func (a *DefAuther) AddAuthBind(authBind *model.AuthBind, userName string) (err error) { dao.WrapAddIDCULDEntity(authBind, userName) err = dao.CreateEntity(nil, authBind) return err } func (a *DefAuther) UnbindAuth(authInfo *auth2.AuthInfo, authType string) (err error) { _, err = dao.DeleteEntityLogically(nil, &model.AuthBind{}, nil, authInfo.GetID(), map[string]interface{}{ "UserID": authInfo.GetID(), "Type": authType, model.FieldDeletedAt: utils.DefaultTimeValue, }) return err } func (a *DefAuther) SendVerifyCode(authID string) error { return errors.New("当前登录类型不支持此操作") } // 此函数为空 func (a *DefAuther) Logout(authInfo *auth2.AuthInfo) error { return nil }