认证支持同一类型多绑定

This commit is contained in:
gazebo
2020-02-13 13:45:44 +08:00
committed by 苏尹岚
parent 6c9fdfbe9f
commit 0477de8916
11 changed files with 39 additions and 27 deletions

View File

@@ -275,6 +275,7 @@ func (c *Auth2Controller) AddAuthBind() {
// @Description 删除认证方式
// @Param token header string true "认证token"
// @Param authType query string true "登录类型参见Login的描述"
// @Param authTypeID query string false "登录类型标识"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /RemoveAuthBind [delete]
@@ -282,7 +283,7 @@ func (c *Auth2Controller) RemoveAuthBind() {
c.callRemoveAuthBind(func(params *tAuth2RemoveAuthBindParams) (retVal interface{}, errCode string, err error) {
authInfo, err2 := params.Ctx.GetV2AuthInfo()
if err = err2; err == nil {
err = auth2.UnbindAuth(authInfo.GetID(), params.AuthType, params.Ctx.GetUserName())
err = auth2.UnbindAuth(authInfo.GetID(), params.AuthType, params.AuthTypeID, params.Ctx.GetUserName())
}
return retVal, "", err
})