From 7218174d461bbe0ec29cabc5d50793e59c701e8e Mon Sep 17 00:00:00 2001 From: Janak Amarasena Date: Fri, 30 Jun 2017 16:13:41 +0530 Subject: [PATCH] Add tenant domain to username --- .../extensions/handlers/grant/AccessTokenGrantHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/AccessTokenGrantHandler.java b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/AccessTokenGrantHandler.java index b161c556e7..1153cb0561 100644 --- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/AccessTokenGrantHandler.java +++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/AccessTokenGrantHandler.java @@ -96,7 +96,7 @@ public class AccessTokenGrantHandler extends AbstractAuthorizationGrantHandler { } if (response != null && response.isValid()) { authStatus = true; - username = response.getUserName(); + username = response.getUserName() + "@" + response.getTenantDomain(); userTenantDomain = MultitenantUtils.getTenantDomain(username); spTenantDomain = response.getTenantDomain(); } else if (response != null && !response.isValid()) {