fix(web(js)): handle SAML assertion expiration

pull/276/head
Francis Lachapelle 2020-05-28 14:53:31 -04:00
parent 105ca88aef
commit 6af55414fb
1 changed files with 3 additions and 3 deletions

View File

@ -335,8 +335,8 @@
// When expecting JSON but receiving HTML, assume session has expired and reload page
var $state;
if (response && /^application\/json/.test(response.config.headers.Accept) &&
/^[\n\r ]*<!DOCTYPE html/.test(response.data)) {
if ($window.usesCASAuthentication) {
/^[\n\r\t ]*<!DOCTYPE html/.test(response.data)) {
if ($window.usesCASAuthentication || $window.usesSAML2Authentication) {
return renewTicket($window, $q, $timeout, $injector, response);
}
else {
@ -360,7 +360,7 @@
responseError: function(rejection) {
var $state;
if (/^application\/json/.test(rejection.config.headers.Accept)) {
// Handle CAS ticket renewal
// Handle SSO ticket renewal
if (($window.usesCASAuthentication || $window.usesSAML2Authentication) && rejection.status == -1) {
return renewTicket($window, $q, $timeout, $injector, rejection);
}