service portal Prevent SSO redirection

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2017 09:32 PM
Hello all,
Can any one tell me how to stop SSO redirection for external users?
I have a widget cloned of OOB login widget. It was working fine, After upgrading to Helsinki patch12a. Not able to stop redirection.
Widget
Client script:
function loginCtrl($rootScope,$scope, $http, $window, $location, urlTools, glideUserSession, glideSystemProperties, spUtil) {
var c = this;
c.register = false;
c.showReg = function(){
console.log('Test!');
c.register = !c.register;
$rootScope.$broadcast('showRegistration', c.register);
};
$scope.$on('showRegistration', function(event,data){
c.register = data;
});
if (typeof c.options.show_panel == 'undefined') {
c.options.show_panel = true;
}
// This is where the redirection happening. Now this block of code though commented SSO still not able to restrict
/* if (!c.data.is_logged_in && c.data.multisso_enabled && c.data.default_idp) {
alert("inside");
c.server.get({
action: "set_sso_destination",
pageURI: c.data.pageURI
}).then(function() {
//$window.location = "/login_with_sso.do?glide_sso_id=" + c.data.default_idp;
});
} */
c.login = function(username, password) {
var url = urlTools.getURL('view_form.login');
// If the page isn't public then the id in the
// url won't match the rendered page id.
var pageId = $location.search().id || $scope.page.id;
var isLoginPage = $scope.portal.login_page_dv == pageId;
return $http({
method: 'post',
url: url,
data: urlTools.encodeURIParameters({
'sysparm_type': 'login',
'ni.nolog.user_password': true,
'remember_me': !!c.remember_me ? true : false,
'user_name': username,
'user_password': password,
'get_redirect_url': true,
'sysparm_goto_url': isLoginPage ? null : '/bd'
}),
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}).then(function(response) {
if (!response.data) {
$scope.message = "${There was an error processing your request}";
return;
}
if (response.data.status == 'success') {
c.success = response.data.message;
$window.location = '/bd';
} else {
// wrong username and password
c.message = response.data.message;
}
}, function errorCallback(response) {
// error
c.message = "${There was an error processing your request}";
});
};
c.externalLogin = function() {
c.server.get({
action: "set_sso_destination",
pageURI: c.data.pageURI
}).then(function() {
glideSystemProperties.set("glide.authenticate.multisso.enabled", true);
glideUserSession.getSsoRedirectUrlForUsername(c.username)
.then(function(url) {
$window.location = url;
}, function(err) {
spUtil.addErrorMessage("${An error has occurred. Please contact your system administrator.}");
});
});
}
c.setExternalLogin = function(newVal) {
console.log("newVal"+ newVal);
c.externalLoginMode = newVal;
}
}
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2017 03:42 AM
are you guys using multi provider SSO?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2017 03:44 AM
Yes. I am using multi provider SSO
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2017 03:47 AM
Okay then try with property "glide.authenticate.sso.redirect.idp" and give the sys_id of IDP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2017 03:49 AM
Oh i am sorry i didn't see the previous post , if that is tried but reach out to Hi folks they will iterate it as the system is not stable

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2017 03:53 AM
Sure thing I will check with HI
Harish