|
|
@@ -70,7 +70,7 @@ public class OAuth2ServerController {
|
|
|
SaClientModel cm = SaOAuth2Handle.currClientModel();
|
|
|
if(cfg.getIsPassword() && (cm.isPassword || cm.isAutoMode)) {
|
|
|
String stpType = LoginUserContextHolder.getStpType();
|
|
|
- if(StrUtil.equalsAny(stpType,LoginTypeConstant.DOCTOR_APP,LoginTypeConstant.WX_APPLET)){
|
|
|
+// if(StrUtil.equalsAny(stpType,LoginTypeConstant.DOCTOR_APP,LoginTypeConstant.WX_APPLET)){
|
|
|
Object retObj = cfg.getDoLoginHandle().apply(source.getUsername(), source.getPassword());
|
|
|
if(!SaTokenUtils.getStpUtil().isLogin()) {
|
|
|
return CommonResult.success();
|
|
|
@@ -84,13 +84,12 @@ public class OAuth2ServerController {
|
|
|
AccessTokenModel at = SaOAuth2Util.generateAccessToken(ra, true);
|
|
|
// 6、返回 Access-Token
|
|
|
return CommonResult.success(at.toLineMap());
|
|
|
- }
|
|
|
- Object result = SaOAuth2Handle.password(req, res, cfg);
|
|
|
- if(result instanceof SaResult){
|
|
|
- SaResult saResult= (SaResult) result;
|
|
|
- return CommonResult.success(saResult.getData());
|
|
|
- }
|
|
|
- throw new ServiceException(TRExcCode.USER_ERROR_A0200,"登录失败");
|
|
|
+// }
|
|
|
+// Object result = SaOAuth2Handle.password(req, res, cfg);
|
|
|
+// if(result instanceof SaResult){
|
|
|
+// SaResult saResult= (SaResult) result;
|
|
|
+// return CommonResult.success(saResult.getData());
|
|
|
+// }
|
|
|
}
|
|
|
throw new ServiceException(TRExcCode.USER_ERROR_A0200,"暂未开放的授权模式");
|
|
|
}
|