Changeset 10351 for main/waeup.cas/trunk/waeup/cas/server.py
- Timestamp:
- 22 Jun 2013, 21:47:04 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.cas/trunk/waeup/cas/server.py
r10343 r10351 2 2 """ 3 3 import os 4 import tempfile 4 5 from webob import exc, Response 5 6 from webob.dec import wsgify … … 10 11 class CASServer(object): 11 12 """A WSGI CAS server. 13 14 This CAS server stores credential data (tickets, etc.) in a local 15 sqlite3 database file. 16 17 `db_path` - 18 The filesystem path to the database to use. If none is given 19 CAS server will create a new one in some new, temporary 20 directory. Please note that credentials will be lost after a 21 CAS server restart. 22 23 If the path is given and the file exists already, it will be 24 used. 25 26 If the database file does not exist, it will be created. 12 27 """ 28 def __init__(self, db_path=None): 29 if db_path is None: 30 db_path = os.path.join(tempfile.mkdtemp(), 'cas.db') 31 self.db_path = db_path 32 13 33 @wsgify 14 34 def __call__(self, req):
Note: See TracChangeset for help on using the changeset viewer.