This commit is contained in:
gazebo
2019-03-04 13:43:50 +08:00
parent d67f09007d
commit f65f3dfadb
4 changed files with 7 additions and 23 deletions

View File

@@ -232,29 +232,6 @@ func AddAuthBind(authInfo *AuthInfo, newAuthInfo *AuthInfo) (err error) {
return err
}
// func AddAuthBind(authInfo *AuthInfo, authType, authID, authIDType, authSecret string) (err error) {
// if authInfo == nil {
// return ErrInternalErrror
// }
// // 密码绑定直接绑定
// if authType == AuthTypePassword {
// err = authers[AuthTypePassword].AddAuthBind(&model.AuthBind{
// UserID: authInfo.GetID(),
// Type: AuthTypePassword,
// AuthID: authInfo.GetID(),
// Status: model.AuthBindStatusNormal,
// }, authInfo.GetName())
// } else {
// tmpauthInfo, err := Login(authType, authID, authIDType, authSecret)
// if err == nil {
// RemoveUserInfo(tmpauthInfo.Token)
// tmpauthInfo.AuthBindInfo.UserID = authInfo.GetID()
// err = authers[authType].AddAuthBind(tmpauthInfo.AuthBindInfo, authInfo.GetName())
// }
// }
// return err
// }
func UnbindAuth(authInfo *AuthInfo, authType string) (err error) {
if handler := authers[authType]; handler != nil {
err = handler.UnbindAuth(authInfo, authType)