Displaying SSO auth failure messages

revert-70aa11f8
Rasika Perera 8 years ago
parent 9fd6145605
commit c284732192

@ -1,6 +1,7 @@
function onRequest(context) { function onRequest(context) {
var authModuleConfigs = context.app.conf["authModule"]; var authModuleConfigs = context.app.conf["authModule"];
var sessionDataKey = request.getParameter("sessionDataKey"); var sessionDataKey = request.getParameter("sessionDataKey");
var authFailure = request.getParameter("authFailure");
//if sso enabled and sessionDataKey is empty redirect //if sso enabled and sessionDataKey is empty redirect
var ssoConfigs = authModuleConfigs["sso"]; var ssoConfigs = authModuleConfigs["sso"];
@ -18,7 +19,11 @@ function onRequest(context) {
var viewModel = {}; var viewModel = {};
var loginActionUrl = context.app.context + "/uuf/login"; var loginActionUrl = context.app.context + "/uuf/login";
if (sessionDataKey) { if (sessionDataKey) {
loginActionUrl = "/commonauth"; loginActionUrl = "/commonauth";
}
if(authFailure){
viewModel.message = "Login failed! Please recheck the username and password and try again.";
} }
viewModel.sessionDataKey = sessionDataKey; viewModel.sessionDataKey = sessionDataKey;

Loading…
Cancel
Save