Changeset f9e571 in indico for indico/web/http_api/auth.py


Ignore:
Timestamp:
08/23/11 15:38:49 (21 months ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
Branches:
master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
Children:
a4766f
Parents:
9c31e72
git-author:
Adrian Moennich <jerome.ernst.monnich@…> (05/11/11 11:07:33)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (08/23/11 15:38:49)
Message:

[IMP] Improve accesskey/signature and cache system

  • cache stores fossil instead of serialized response
  • https enforcement can be enabled/disabled
  • api key/signature checking can now be configured
  • add request argument to make an authenticated request return only public data
File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/web/http_api/auth.py

    r14b949 rf9e571  
    4545        self._lastPath = None 
    4646        self._lastQuery = None 
     47        self._lastUseAuthenticated = False 
    4748        self._oldKeys = PersistentList() 
    4849 
     
    8687        return self._useCount 
    8788 
     89    def isLastUseAuthenticated(self): 
     90        return self._lastUseAuthenticated 
     91 
    8892    def getLastRequest(self): 
    8993        if not self._lastPath: 
     
    96100        return self._oldKeys 
    97101 
    98     def used(self, ip, path, query): 
     102    def used(self, ip, path, query, authenticated): 
    99103        self._lastUsedDT = datetime.datetime.now() 
    100104        self._lastUsedIP = ip 
    101105        self._lastPath = path 
    102106        self._lastQuery = query 
     107        self._lastUseAuthenticated = authenticated 
    103108        self._useCount += 1 
    104109 
Note: See TracChangeset for help on using the changeset viewer.