Package flumotion :: Package component :: Package bouncers :: Module plug :: Class TrivialBouncerPlug
[hide private]

Class TrivialBouncerPlug

source code

extern.log.log.Loggable --+            
                          |            
            plugs.base.Plug --+        
                              |        
       plugs.base.ComponentPlug --+    
                                  |    
                     object --+   |    
                              |   |    
        common.common.InitMixin --+    
                                  |    
                        BouncerPlug --+
                                      |
                                     TrivialBouncerPlug

A very trivial bouncer implementation.

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

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

Inherited from BouncerPlug: __init__, addKeycard, authenticate, expireAllKeycards, expireKeycardId, generateKeycardId, hasKeycard, init, keepAlive, removeKeycard, removeKeycardId, setEnabled, setMedium, stop, typeAllowed

Inherited from BouncerPlug (private): _expire

Inherited from plugs.base.ComponentPlug: restart, start

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

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

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 BouncerPlug: KEYCARD_EXPIRE_INTERVAL, logCategory

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

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 None to deny the keycard, or a deferred which should have the same eventual value.

Overrides: BouncerPlug.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'>)