From 894e11c1c4737340b0dc2618e1b3c42ecaf22c6d Mon Sep 17 00:00:00 2001 From: mharindu Date: Tue, 17 May 2016 15:39:16 +0530 Subject: [PATCH] Fixed the JWT verifier issue --- .../authenticator/framework/authenticator/JWTAuthenticator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/JWTAuthenticator.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/JWTAuthenticator.java index 0a09483f6d..e7179b0d79 100644 --- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/JWTAuthenticator.java +++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/JWTAuthenticator.java @@ -99,7 +99,7 @@ public class JWTAuthenticator implements WebappAuthenticator { //Get the filesystem keystore default primary certificate JWSVerifier verifier = new RSASSAVerifier((RSAPublicKey) publicKey); //https://wso2.org/jira/browse/APIMANAGER-4504 need to change this to jwsObject.verify(verifier) - if (username != null && !username.isEmpty() && tenantDomain != null && !tenantDomain.isEmpty()) { + if (jwsObject.verify(verifier)) { username = MultitenantUtils.getTenantAwareUsername(username); if (tenantId == -1) { log.error("tenantDomain is not valid. username : " + username + ", tenantDomain " +