- status
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user