From 88bdad18b1c2163069ec53a5288646d6feb2f7bf Mon Sep 17 00:00:00 2001 From: Janak Amarasena Date: Fri, 23 Jun 2017 17:50:42 +0530 Subject: [PATCH 1/2] Fixes NPE --- .../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 b659d1bb870..36f07a0075c 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 @@ -51,7 +51,7 @@ public class AccessTokenGrantHandler extends AbstractAuthorizationGrantHandler { public AccessTokenGrantHandler() { try { - // tokenValidator = OAuthValidatorFactory.getValidator(); + tokenValidator = new LocalOAuthValidator(); } catch (IllegalArgumentException e) { log.error("Failed to initialise Authenticator", e); } From 0f41dce3947c1186f60cbc8f1d1394265814a3e3 Mon Sep 17 00:00:00 2001 From: Janak Amarasena Date: Fri, 23 Jun 2017 17:53:32 +0530 Subject: [PATCH 2/2] Fixed spacing --- .../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 36f07a0075c..090a6f0f1bd 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 @@ -51,7 +51,7 @@ public class AccessTokenGrantHandler extends AbstractAuthorizationGrantHandler { public AccessTokenGrantHandler() { try { - tokenValidator = new LocalOAuthValidator(); + tokenValidator = new LocalOAuthValidator(); } catch (IllegalArgumentException e) { log.error("Failed to initialise Authenticator", e); }