From 896443620f89001434ddf55581f51902d50d6cd7 Mon Sep 17 00:00:00 2001 From: charitha Date: Mon, 22 Oct 2018 19:24:49 +0530 Subject: [PATCH] Fix twisted username and password fields in remote session --- .../authentication/oauth/OAuthTokenValidatorStubFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/extensions/remote-session-extension/org.wso2.carbon.device.mgt.extensions.remote.session/src/main/java/org/wso2/carbon/device/mgt/extensions/remote.session/authentication/oauth/OAuthTokenValidatorStubFactory.java b/components/extensions/remote-session-extension/org.wso2.carbon.device.mgt.extensions.remote.session/src/main/java/org/wso2/carbon/device/mgt/extensions/remote.session/authentication/oauth/OAuthTokenValidatorStubFactory.java index 15723a2c89..93a49160b2 100644 --- a/components/extensions/remote-session-extension/org.wso2.carbon.device.mgt.extensions.remote.session/src/main/java/org/wso2/carbon/device/mgt/extensions/remote.session/authentication/oauth/OAuthTokenValidatorStubFactory.java +++ b/components/extensions/remote-session-extension/org.wso2.carbon.device.mgt.extensions.remote.session/src/main/java/org/wso2/carbon/device/mgt/extensions/remote.session/authentication/oauth/OAuthTokenValidatorStubFactory.java @@ -107,8 +107,8 @@ public class OAuthTokenValidatorStubFactory extends BasePoolableObjectFactory { auth.setPreemptiveAuthentication(true); String username = tokenValidationProperties.get(RemoteSessionConstants.USERNAME); String password = tokenValidationProperties.get(RemoteSessionConstants.PASSWORD); - auth.setPassword(username); - auth.setUsername(password); + auth.setUsername(username); + auth.setPassword(password); Options options = client.getOptions(); options.setProperty(HTTPConstants.AUTHENTICATE, auth); options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Constants.VALUE_TRUE);