|
|
|
@ -311,8 +311,8 @@ func authorizePost(context *gin.Context) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
//调用service层的用户名和密码校验办法判断是不是允许登录
|
|
|
|
|
ip:=context.ClientIP()
|
|
|
|
|
success, identityId, personId, _ = ServiceLoginPerson.Login(username, string(decryptPwd),ip)
|
|
|
|
|
ip := context.ClientIP()
|
|
|
|
|
success, identityId, personId, _ = ServiceLoginPerson.Login(username, string(decryptPwd), ip)
|
|
|
|
|
if !success {
|
|
|
|
|
context.JSON(http.StatusOK, Model.Res{
|
|
|
|
|
Code: http.StatusNotImplemented,
|
|
|
|
@ -321,7 +321,7 @@ func authorizePost(context *gin.Context) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if CommonUtil.ConvertStringToInt(identityId)>1{
|
|
|
|
|
if CommonUtil.ConvertStringToInt(identityId) > 1 {
|
|
|
|
|
context.JSON(http.StatusOK, Model.Res{
|
|
|
|
|
Code: http.StatusNotImplemented,
|
|
|
|
|
Msg: "非管理员用户暂不能登录,敬请期待!!",
|
|
|
|
@ -367,7 +367,7 @@ func authorizeGet(context *gin.Context) {
|
|
|
|
|
context.JSON(http.StatusOK, map[string]interface{}{"success": false, "msg": msg})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
var sysUrl=client.GetRedirectUri()
|
|
|
|
|
var sysUrl = client.GetRedirectUri()
|
|
|
|
|
if strings.Index(sysUrl, redirectUri) < 0 {
|
|
|
|
|
msg := "回调地址与系统中保存的不一致!"
|
|
|
|
|
context.JSON(http.StatusOK, map[string]interface{}{"success": false, "msg": msg})
|
|
|
|
@ -382,7 +382,7 @@ func authorizeGet(context *gin.Context) {
|
|
|
|
|
if SsoSessionId != "" {
|
|
|
|
|
//取出UserData
|
|
|
|
|
identityId, personId, _ = SsoUtil.AnalyzeSessionId(SsoSessionId)
|
|
|
|
|
if ConvertUtil.StringToInt(identityId) > 0 && ConvertUtil.StringToInt(personId) > 0 {
|
|
|
|
|
if identityId != "" && personId != "" {
|
|
|
|
|
//为其生成授权码,并返回给客户端系统
|
|
|
|
|
generateAuthCode(context, identityId, personId, deviceId, "GET")
|
|
|
|
|
return
|
|
|
|
|