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

Class TrivialBouncer

source code

             object --+            
                      |            
common.common.InitMixin --+        
                          |        
extern.log.log.Loggable --+        
                          |        
    component.BaseComponent --+    
                              |    
                        Bouncer --+
                                  |
                                 TrivialBouncer

A very trivial bouncer implementation.

Useful as a concrete bouncer class for which all users are accepted whenever the bouncer is enabled.

Nested Classes [hide private]

Inherited from Bouncer: componentMediumClass

Instance Methods [hide private]
 
do_authenticate(self, keycard)
Must be overridden by subclasses.
source code

Inherited from Bouncer: addKeycard, authenticate, do_expireKeycards, do_stop, do_validate, expireAllKeycards, expireKeycardId, expireKeycardIds, generateKeycardId, getDomain, getEnabled, hasKeycard, init, keepAlive, on_disabled, 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]
tuple of flumotion.common.keycards.Keycard class objects keycardClasses = (<class 'flumotion.common.keycards.KeycardGen...
tuple of all classes of keycards this bouncer can authenticate, in order of preference

Inherited from Bouncer: KEYCARD_EXPIRE_INTERVAL, 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]

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)

Class Variable Details [hide private]

keycardClasses

tuple of all classes of keycards this bouncer can authenticate, in order of preference
Type:
tuple of flumotion.common.keycards.Keycard class objects
Value:
(<class 'flumotion.common.keycards.KeycardGeneric'>)