From f8785d06ab836ea1d45788a0d8c721526eb36008 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 13 Jan 2021 14:13:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=80=9A=E8=BF=87apikey=E7=99=BB?= =?UTF-8?q?=E9=99=86=E4=BD=BF=E7=94=A8local=20realm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/metersphere/security/ApiKeyFilter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/security/ApiKeyFilter.java b/backend/src/main/java/io/metersphere/security/ApiKeyFilter.java index 71821c7892..8eebd064f0 100644 --- a/backend/src/main/java/io/metersphere/security/ApiKeyFilter.java +++ b/backend/src/main/java/io/metersphere/security/ApiKeyFilter.java @@ -22,12 +22,12 @@ public class ApiKeyFilter extends AnonymousFilter { if (LogUtil.getLogger().isDebugEnabled()) { LogUtil.getLogger().debug("user auth: " + userId); } - SecurityUtils.getSubject().login(new MsUserToken(userId, ApiKeySessionHandler.random, "APIKEY")); + SecurityUtils.getSubject().login(new MsUserToken(userId, ApiKeySessionHandler.random, "LOCAL")); } } else { if (ApiKeyHandler.isApiKeyCall(WebUtils.toHttp(request))) { String userId = ApiKeyHandler.getUser(WebUtils.toHttp(request)); - SecurityUtils.getSubject().login(new MsUserToken(userId, ApiKeySessionHandler.random, "APIKEY")); + SecurityUtils.getSubject().login(new MsUserToken(userId, ApiKeySessionHandler.random, "LOCAL")); } }