From ddd6b7ed8eb448f2288a1a383f21fa251d747a5f Mon Sep 17 00:00:00 2001 From: charitha Date: Fri, 19 Oct 2018 23:01:52 +0530 Subject: [PATCH] Fix twisted username and password fields --- .../oauth/OAuthTokenValidaterStubFactory.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/src/main/java/org/wso2/carbon/device/mgt/output/adapter/websocket/authentication/oauth/OAuthTokenValidaterStubFactory.java b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/src/main/java/org/wso2/carbon/device/mgt/output/adapter/websocket/authentication/oauth/OAuthTokenValidaterStubFactory.java index 637787c68..5beb5c487 100644 --- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/src/main/java/org/wso2/carbon/device/mgt/output/adapter/websocket/authentication/oauth/OAuthTokenValidaterStubFactory.java +++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/src/main/java/org/wso2/carbon/device/mgt/output/adapter/websocket/authentication/oauth/OAuthTokenValidaterStubFactory.java @@ -107,9 +107,9 @@ public class OAuthTokenValidaterStubFactory extends BasePoolableObjectFactory { auth.setPreemptiveAuthentication(true); String username = tokenValidationProperties.get(WebsocketConstants.USERNAME); String password = tokenValidationProperties.get(WebsocketConstants.PASSWORD); - auth.setPassword(username); - auth.setUsername(password); - Options options = client.getOptions(); + auth.setUsername(username); + auth.setPassword(password); + Options options = client.getOptions(); options.setProperty(HTTPConstants.AUTHENTICATE, auth); options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Constants.VALUE_TRUE); client.setOptions(options);