Cannot login via SAML when using New UI OpenURL Services page
- Product: Primo
- Product Version: Primo August 2016
- Relevant for Installation Type: Dedicated-Direct, Direct, Local, Total Care
Symptoms
- The View ID contains a character that might be encoded (e.g. an underscore: 01MY_INST)
- OpenURLs are directed to the New UI
- Using the New Primo User Authentication mechanism
- Authentication is setup for Dual Login
- The Main Profile uses SAML
- Trying to login after following an OpenURL results in an error page
- The FE library server log contains an error:
- Indicating the View ID cannot be found
- The View ID contains a percent-encoded character
2016-10-06 19:00:23,269 WARN [t-http-bio-1701-exec-11098] [c-PrimoViewConfigurationManager] [O -] - Failed to find primo view with id 01MY%5FINST switching to default.
Defect Status
Development
Workaround
- Add the code below to the custom.js file in a View customization package
-
Add the code after the line containing:
var app = angular.module('viewCustom', ['angularLoad']); -
Add the code before the line containing:
})();
-
In line 3 replace 5F (underscore) with the percent code for the problem character in the View ID
-
-
Create the package
-
Upload the package to the View
function fix32700() {
app.controller('prmAuthenticationAfterController', [function () {
var vm = this;
var loginServ = vm.parentCtrl.loginService;
vm.$onInit = function () {
loginServ.normalizeTargetUrl = function () {
let returnURL = decodeURIComponent(this.$location.absUrl());
angular.forEach(this.$state.params, function (value, key) {
if (key !== 'vid' && value) {
if (Array.isArray(value)) {
value.map((pValue) => {
returnURL = returnURL.replace(pValue, encodeURIComponent(this.replaceCharacters(encodeURIComponent(pValue))));
});
} else {
let pValue = value;
returnURL = returnURL.replace(key+'='+pValue, key+"="+encodeURIComponent(this.replaceCharacters(encodeURIComponent(pValue))));
}
}
}, this);
return returnURL;
}
};
}]);
app.component('prmAuthenticationAfter', {
bindings: {
parentCtrl: '<'
},
controller: 'prmAuthenticationAfterController'
});
}
fix32700();
- Article last edited: 24-Mar-2017

