From 03541a6f85fee6ad32b7f61f58f6248c97bd0817 Mon Sep 17 00:00:00 2001 From: zkitefly <64117916+zkitefly@users.noreply.github.com> Date: Sat, 10 Sep 2022 21:50:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20response.errorDescription.?= =?UTF-8?q?contains()=20=E5=8F=82=E6=95=B0=20(#1708)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 添加两个 response.errorDescription.contains() * 再添加一个qwq * 删除重复项 * 恢复删除的项 * 修改 * 修改 --- HMCLCore/src/main/java/org/jackhuang/hmcl/auth/OAuth.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/auth/OAuth.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/auth/OAuth.java index fd3825a10..44e3d6237 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/auth/OAuth.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/auth/OAuth.java @@ -181,8 +181,7 @@ public class OAuth { switch (response.error) { case "invalid_grant": - if (response.errorDescription.contains("The user must sign in again and if needed grant the client application access to the requested scope") || - response.errorDescription.contains("The user could not be authenticated as the grant is expired")) { + if (response.errorDescription.contains("AADSTS70000")) { throw new CredentialExpiredException(); } break;