1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 from flumotion.component import component
23
24 __all__ = ['Bouncer']
25 __version__ = "$Rev: 6125 $"
26
27
29
30 logCategory = 'bouncermedium'
32 """
33 Authenticates the given keycard.
34
35 @type keycard: L{flumotion.common.keycards.Keycard}
36 """
37 return self.comp.authenticate(keycard)
38
40 """
41 Resets the expiry timeout for keycards issued by issuerName.
42
43 @param issuerName: the issuer for which keycards should be kept
44 alive; that is to say, keycards with the
45 attribute 'issuerName' set to this value will
46 have their ttl values reset.
47 @type issuerName: str
48 @param ttl: the new expiry timeout
49 @type ttl: number
50 """
51 return self.comp.keepAlive(issuerName, ttl)
52
54 try:
55 self.comp.removeKeycardId(keycardId)
56
57 except KeyError:
58 self.warning('Could not remove keycard id %s' % keycardId)
59
61 """
62 Called by bouncer views to expire keycards.
63 """
64 return self.comp.expireKeycardId(keycardId)
65
68
69
70 BOUNCER_SOCKET = 'flumotion.component.bouncers.plug.BouncerPlug'
71
72
73 -class Bouncer(component.BaseComponent):
74 """
75 I am the base class for all bouncers.
76 """
77 componentMediumClass = BouncerMedium
78 logCategory = 'bouncer'
79
82
86
90
93
96
99
102
105
108