Add a timeout to SLO requests
This commit is contained in:
		@@ -99,6 +99,7 @@ Authentication settings:
 | 
			
		||||
 | 
			
		||||
* ``CAS_SLO_MAX_PARALLEL_REQUESTS``: Maximum number of parallel single log out requests send.
 | 
			
		||||
  If more requests need to be send, there are queued. The default is ``10``.
 | 
			
		||||
* ``CAS_SLO_TIMEOUT``: Timeout for a single SLO request in seconds. The default is ``5``.
 | 
			
		||||
 | 
			
		||||
Tickets validity settings:
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -59,6 +59,8 @@ setting_default('CAS_PROXY_GRANTING_TICKET_IOU_PREFIX', 'PGTIOU')
 | 
			
		||||
# Maximum number of parallel single log out requests send
 | 
			
		||||
# if more requests need to be send, there are queued
 | 
			
		||||
setting_default('CAS_SLO_MAX_PARALLEL_REQUESTS', 10)
 | 
			
		||||
# SLO request timeout.
 | 
			
		||||
setting_default('CAS_SLO_TIMEOUT', 5)
 | 
			
		||||
 | 
			
		||||
setting_default('CAS_SQL_HOST', 'localhost')
 | 
			
		||||
setting_default('CAS_SQL_USERNAME', '')
 | 
			
		||||
 
 | 
			
		||||
@@ -405,6 +405,7 @@ class Ticket(models.Model):
 | 
			
		||||
                    session.post(
 | 
			
		||||
                        url.encode('utf-8'),
 | 
			
		||||
                        data={'logoutRequest': xml.encode('utf-8')},
 | 
			
		||||
                        timeout=settings.CAS_SLO_TIMEOUT
 | 
			
		||||
                    )
 | 
			
		||||
                )
 | 
			
		||||
            except Exception as error:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user