From 1e3ac362b8f3adbbbb1aa6227cfa282f4f6e1300 Mon Sep 17 00:00:00 2001 From: lasanthaDLPDS Date: Sat, 26 Oct 2019 08:06:20 +0530 Subject: [PATCH] Remove super admin tenant domain from /user API response --- .../java/io/entgra/ui/request/interceptor/UserHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/UserHandler.java b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/UserHandler.java index 81041d9e9c..6f59f28fe8 100644 --- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/UserHandler.java +++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/UserHandler.java @@ -103,7 +103,8 @@ public class UserHandler extends HttpServlet { } ProxyResponse proxyResponse = new ProxyResponse(); proxyResponse.setCode(HttpStatus.SC_OK); - proxyResponse.setData(jTokenResultAsJsonObject.get("username").getAsString()); + proxyResponse.setData( + jTokenResultAsJsonObject.get("username").getAsString().replaceAll("@carbon.super", "")); HandlerUtil.handleSuccess(req, resp, serverUrl, platform, proxyResponse); } } catch (IOException e) {