From c2847321923acc15926c18ed329c8c9ab5380e09 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Fri, 9 Dec 2016 18:22:09 +0530 Subject: [PATCH] Displaying SSO auth failure messages --- .../devicemgt/app/pages/cdmf.page.sign-in/sign-in.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.sign-in/sign-in.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.sign-in/sign-in.js index dfc0877482..cea0fc2d7b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.sign-in/sign-in.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.sign-in/sign-in.js @@ -1,6 +1,7 @@ function onRequest(context) { var authModuleConfigs = context.app.conf["authModule"]; var sessionDataKey = request.getParameter("sessionDataKey"); + var authFailure = request.getParameter("authFailure"); //if sso enabled and sessionDataKey is empty redirect var ssoConfigs = authModuleConfigs["sso"]; @@ -18,7 +19,11 @@ function onRequest(context) { var viewModel = {}; var loginActionUrl = context.app.context + "/uuf/login"; if (sessionDataKey) { - loginActionUrl = "/commonauth"; + loginActionUrl = "/commonauth"; + } + + if(authFailure){ + viewModel.message = "Login failed! Please recheck the username and password and try again."; } viewModel.sessionDataKey = sessionDataKey;