소스 검색

优化结果判断

zhouhao 7 년 전
부모
커밋
417fb08082

+ 3 - 0
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/simple/provider/HswebResponseJudgeSupport.java

@@ -41,6 +41,9 @@ public class HswebResponseJudgeSupport implements ResponseJudgeForProviderDefini
         if (result == null) {
             return ErrorType.OTHER;
         }
+        if (!result.trim().startsWith("{")) {
+            return null;
+        }
         JSONObject jsonRes = JSON.parseObject(result);
         Integer status = jsonRes.getInteger("status");
         if (status == null && response.status() == 200) {