- IAuther.UnbindAuth的接口改为userID

This commit is contained in:
gazebo
2019-08-13 11:02:14 +08:00
parent 37b931abe5
commit d59ca265c4
4 changed files with 8 additions and 8 deletions

View File

@@ -71,7 +71,7 @@ type IAuther interface {
// 负责验证secret并找到相应的用户返回password,email,mobile类型的不负责用户查找如果找不到用户UserID为空
VerifySecret(authID, authSecret string) (authBindEx *AuthBindEx, err error)
AddAuthBind(authBindEx *AuthBindEx, userName string) (err error)
UnbindAuth(authInfo *AuthInfo, authType string) (err error)
UnbindAuth(userID, authType, userName string) (err error)
Logout(authInfo *AuthInfo) (err error)
}
@@ -277,9 +277,9 @@ func AddAuthBind(user IUser, newAuthInfo *AuthInfo) (err error) {
return err
}
func UnbindAuth(authInfo *AuthInfo, authType string) (err error) {
func UnbindAuth(userID, authType, userName string) (err error) {
if handler := authers[authType]; handler != nil {
err = handler.UnbindAuth(authInfo, authType)
err = handler.UnbindAuth(userID, authType, userName)
} else {
err = ErrIllegalAuthType
}