Package flumotion :: Package component :: Package base :: Module http :: Class HTTPAuthentication
[hide private]

Class HTTPAuthentication

source code

extern.log.log.Loggable --+
                          |
                         HTTPAuthentication

Helper object for handling HTTP authentication for twisted.web Resources, using issuers and bouncers.

Instance Methods [hide private]
 
__init__(self, component) source code
 
scheduleKeepAlive(self, tryingAgain=False) source code
 
stopKeepAlive(self) source code
 
setDomain(self, domain)
Set a domain name on the resource, used in HTTP auth challenges and on the keycard.
source code
 
setBouncerName(self, bouncerName) source code
 
setRequesterId(self, requesterId) source code
 
setDefaultDuration(self, defaultDuration) source code
 
setIssuerClass(self, issuerClass) source code
 
authenticate(self, request)
Returns: a deferred returning a keycard or None
source code
 
authenticateKeycard(self, bouncerName, keycard) source code
 
keepAlive(self, bouncerName, issuerName, ttl) source code
 
cleanupKeycard(self, bouncerName, keycard) source code
 
clientDone(self, fd) source code
 
doCleanupKeycard(self, bouncerName, keycard) source code
 
cleanupAuth(self, fd) source code
 
_durationCallLater(self, fd)
Expire a client due to a duration expiration.
source code
 
expireKeycard(self, keycardId)
Expire a client's connection associated with the keycard Id.
source code
 
startAuthentication(self, request) source code
 
_authenticatedCallback(self, keycard, request) source code
 
_authenticatedErrback(self, failure, request) source code
 
_defaultErrback(self, failure, request) source code
 
_handleUnauthorized(self, request, code) source code

Inherited from extern.log.log.Loggable: __providedBy__, debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure, writeMarker

Class Variables [hide private]
  logCategory = 'httpauth'
Implementors can provide a category to log their messages under.
  KEYCARD_TTL = 3600
  KEYCARD_KEEPALIVE_INTERVAL = 1200
  KEYCARD_TRYAGAIN_INTERVAL = 60

Inherited from extern.log.log.Loggable: __implemented__, __provides__

Method Details [hide private]

setDomain(self, domain)

source code 

Set a domain name on the resource, used in HTTP auth challenges and on the keycard.

Parameters:
  • domain (string)