Fix SAML2 session timeout during XHR requests
parent
e6e1fddb3e
commit
162206b934
1
NEWS
1
NEWS
|
@ -7,6 +7,7 @@ Enhancements
|
||||||
Bug fixes
|
Bug fixes
|
||||||
- [core] properly update the last-modified attribute (#4313)
|
- [core] properly update the last-modified attribute (#4313)
|
||||||
- [web] prevent deletion of special folders using del key
|
- [web] prevent deletion of special folders using del key
|
||||||
|
- [web] fixed SAML2 session timeout handling during XHR requests
|
||||||
- [eas] improved alarms syncing with EAS devices (#4351)
|
- [eas] improved alarms syncing with EAS devices (#4351)
|
||||||
- [eas] avoid potential cache update when breaking sync queries (#4422)
|
- [eas] avoid potential cache update when breaking sync queries (#4422)
|
||||||
|
|
||||||
|
|
|
@ -472,6 +472,15 @@
|
||||||
return [[sd authenticationType] isEqualToString: @"cas"];
|
return [[sd authenticationType] isEqualToString: @"cas"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL) usesSAML2Authentication
|
||||||
|
{
|
||||||
|
SOGoSystemDefaults *sd;
|
||||||
|
|
||||||
|
sd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||||
|
|
||||||
|
return [[sd authenticationType] isEqualToString: @"saml2"];
|
||||||
|
}
|
||||||
|
|
||||||
- (NSString *) userIdentification
|
- (NSString *) userIdentification
|
||||||
{
|
{
|
||||||
NSString *v;
|
NSString *v;
|
||||||
|
|
|
@ -85,6 +85,12 @@
|
||||||
<var:if condition="usesCASAuthentication" const:negate="YES">
|
<var:if condition="usesCASAuthentication" const:negate="YES">
|
||||||
var usesCASAuthentication = false;
|
var usesCASAuthentication = false;
|
||||||
</var:if>
|
</var:if>
|
||||||
|
<var:if condition="usesSAML2Authentication">
|
||||||
|
var usesSAML2Authentication = true;
|
||||||
|
</var:if>
|
||||||
|
<var:if condition="usesSAML2Authentication" const:negate="YES">
|
||||||
|
var usesSAML2Authentication = false;
|
||||||
|
</var:if>
|
||||||
<var:if condition="shortUserNameForDisplay" const:value="anonymous" const:negate="YES">
|
<var:if condition="shortUserNameForDisplay" const:value="anonymous" const:negate="YES">
|
||||||
var UserFolderURL = '<var:string value="userFolderPath" const:escapeHTML="NO" />';
|
var UserFolderURL = '<var:string value="userFolderPath" const:escapeHTML="NO" />';
|
||||||
var UserLogin = '<var:string value="shortUserNameForDisplay" const:escapeHTML="NO" />';
|
var UserLogin = '<var:string value="shortUserNameForDisplay" const:escapeHTML="NO" />';
|
||||||
|
|
|
@ -267,9 +267,10 @@
|
||||||
var deferred, iframe;
|
var deferred, iframe;
|
||||||
if (/^application\/json/.test(rejection.config.headers.Accept)) {
|
if (/^application\/json/.test(rejection.config.headers.Accept)) {
|
||||||
// Handle CAS ticket renewal
|
// Handle CAS ticket renewal
|
||||||
if ($window.usesCASAuthentication && rejection.status == -1) {
|
if (($window.usesCASAuthentication && rejection.status == -1) ||
|
||||||
|
($window.usesSAML2Authentication && rejection.status == 401)) {
|
||||||
deferred = $q.defer();
|
deferred = $q.defer();
|
||||||
iframe = angular.element('<iframe class="ng-hide" src="' + UserFolderURL + 'recover"></iframe>');
|
iframe = angular.element('<iframe class="ng-hide" src="' + $window.UserFolderURL + 'recover"></iframe>');
|
||||||
iframe.on('load', function() {
|
iframe.on('load', function() {
|
||||||
// Once the browser has followed the redirection, send the initial request
|
// Once the browser has followed the redirection, send the initial request
|
||||||
var $http = $injector.get('$http');
|
var $http = $injector.get('$http');
|
||||||
|
|
Loading…
Reference in New Issue