Package flumotion :: Package component :: Package bouncers :: Module component :: Class ChallengeResponseBouncer
[hide private]

Class ChallengeResponseBouncer

source code

             object --+                
                      |                
common.common.InitMixin --+            
                          |            
extern.log.log.Loggable --+            
                          |            
    component.BaseComponent --+        
                              |        
                        Bouncer --+    
                                  |    
                 AuthSessionBouncer --+
                                      |
                                     ChallengeResponseBouncer
Known Subclasses:

A base class for Challenge-Response bouncers

Nested Classes [hide private]

Inherited from Bouncer: componentMediumClass

Instance Methods [hide private]
 
init(self)
A subclass should do as little as possible in its init method.
source code
 
setChecker(self, checker) source code
 
addUser(self, user, salt, *args) source code
 
do_extractKeycardInfo(self, keycard, oldData)
Extracts session info from a keycard.
source code
 
_requestAvatarIdCallback(self, PossibleAvatarId, keycard) source code
 
_requestAvatarIdErrback(self, failure, keycard) source code
 
do_authenticate(self, keycard)
Must be overridden by subclasses.
source code

Inherited from AuthSessionBouncer: cancelAuthSession, confirmAuthSession, do_expireKeycards, getAuthSessionInfo, hasAuthSession, on_disabled, startAuthSession, updateAuthSession, updateAuthSessionInfo

Inherited from AuthSessionBouncer (private): _updateInfoFromKeycard

Inherited from Bouncer: addKeycard, authenticate, do_stop, do_validate, expireAllKeycards, expireKeycardId, expireKeycardIds, generateKeycardId, getDomain, getEnabled, hasKeycard, keepAlive, on_enabled, on_keycardAdded, on_keycardRemoved, removeKeycard, removeKeycardId, setDomain, setEnabled, typeAllowed

Inherited from Bouncer (private): _addKeycard, _expire, _expireNextKeycardBlock

Inherited from component.BaseComponent: __init__, __provides__, addMessage, adminCallRemote, checkPropertyType, check_properties, do_check, do_setup, fixRenamedProperties, getMood, getName, getWorkerName, modifyProperty, observerAppend, observerRemove, removeMessage, setMedium, setMood, setShutdownHook, setWorkerName, setup, setup_completed, stop, waitForHappy, warnDeprecatedProperties

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

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

Class Variables [hide private]
  challengeResponseClasses = ()

Inherited from Bouncer: KEYCARD_EXPIRE_INTERVAL, keycardClasses, logCategory

Inherited from component.BaseComponent: __implemented__

Instance Variables [hide private]

Inherited from component.BaseComponent: medium, name, uiState

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

init(self)

source code 

A subclass should do as little as possible in its init method. In particular, it should not try to access resources.

Failures during init are marshalled back to the manager through the worker's remote_create method, since there is no component state proxied to the manager yet at the time of init.

Overrides: component.BaseComponent.init
(inherited documentation)

do_extractKeycardInfo(self, keycard, oldData)

source code 

Extracts session info from a keycard. Used by updateAuthSession to store session info. Must be overridden by subclasses.

Overrides: AuthSessionBouncer.do_extractKeycardInfo
(inherited documentation)

do_authenticate(self, keycard)

source code 

Must be overridden by subclasses.

Authenticate the given keycard. Return the keycard with state AUTHENTICATED to authenticate, with state REQUESTING to continue the authentication process, or REFUSED to deny the keycard or a deferred which should have the same eventual value.

FIXME: Currently, a return value of 'None' is treated as rejecting the keycard. This is unintuitive.

FIXME: in fact, for authentication sessions like challenge/response, returning a keycard with state REFUSED instead of None will not work properly and may enter in an asynchronous infinit loop.

Overrides: Bouncer.do_authenticate
(inherited documentation)