There are no attributes in this class.
addPrincipalSource(id, principal_source)
See IPluggableAuthentication.
>>> pas = PluggableAuthentication(None, True) >>> sps = BTreePrincipalSource() >>> pas.addPrincipalSource('simple', sps) >>> sps2 = BTreePrincipalSource() >>> pas.addPrincipalSource('not_quite_so_simple', sps2) >>> pas.keys() ['simple', 'not_quite_so_simple']
authenticate(request)
See IAuthentication.
get(key, default=None)
See IOrderedContainer.
>>> oc = OrderedContainer() >>> oc['foo'] = 'bar' >>> oc.get('foo') 'bar' >>> oc.get('funky', 'No chance, dude.') 'No chance, dude.'
getPrincipal(id)
See IAuthentication.
For this implementation, an id is a string which can be split into a 3-tuple by splitting on tab characters. The three tuple consists of (auth_utility_earmark, principal_source_id, principal_id).
In the current strategy, the principal sources that are members of this authentication utility cannot be renamed; if they are, principal references that embed the old name will not be dereferenceable.
getPrincipals(name)
See IAuthentication.
has_key(key)
See IOrderedContainer.
>>> oc = OrderedContainer() >>> oc['foo'] = 'bar' >>> int('foo' in oc) 1 >>> int('quux' in oc) 0
items()
See IOrderedContainer.
>>> oc = OrderedContainer() >>> oc.keys() [] >>> oc['foo'] = 'bar' >>> oc.items() [('foo', 'bar')] >>> oc['baz'] = 'quux' >>> oc.items() [('foo', 'bar'), ('baz', 'quux')] >>> int(len(oc._order) == len(oc._data)) 1
keys()
See IOrderedContainer.
>>> oc = OrderedContainer() >>> oc.keys() [] >>> oc['foo'] = 'bar' >>> oc.keys() ['foo'] >>> oc['baz'] = 'quux' >>> oc.keys() ['foo', 'baz'] >>> int(len(oc._order) == len(oc._data)) 1
removePrincipalSource(id)
See IPluggableAuthentication.
>>> pas = PluggableAuthentication(None, True) >>> sps = BTreePrincipalSource() >>> pas.addPrincipalSource('simple', sps) >>> sps2 = BTreePrincipalSource() >>> pas.addPrincipalSource('not_quite_so_simple', sps2) >>> sps3 = BTreePrincipalSource() >>> pas.addPrincipalSource('simpler', sps3) >>> pas.keys() ['simple', 'not_quite_so_simple', 'simpler'] >>> pas.removePrincipalSource('not_quite_so_simple') >>> pas.keys() ['simple', 'simpler']
unauthenticatedPrincipal()
unauthorized(id, request)
See IAuthentication.
updateOrder(order)
See IOrderedContainer.
>>> oc = OrderedContainer() >>> oc['foo'] = 'bar' >>> oc['baz'] = 'quux' >>> oc['zork'] = 'grue' >>> oc.keys() ['foo', 'baz', 'zork'] >>> oc.updateOrder(['baz', 'foo', 'zork']) >>> oc.keys() ['baz', 'foo', 'zork'] >>> oc.updateOrder(['baz', 'zork', 'foo']) >>> oc.keys() ['baz', 'zork', 'foo'] >>> oc.updateOrder(['baz', 'zork', 'foo']) >>> oc.keys() ['baz', 'zork', 'foo'] >>> oc.updateOrder(('zork', 'foo', 'baz')) >>> oc.keys() ['zork', 'foo', 'baz'] >>> oc.updateOrder(['baz', 'zork']) Traceback (most recent call last): ... ValueError: Incompatible key set. >>> oc.updateOrder(['foo', 'bar', 'baz', 'quux']) Traceback (most recent call last): ... ValueError: Incompatible key set. >>> oc.updateOrder(1) Traceback (most recent call last): ... TypeError: order must be a tuple or a list. >>> oc.updateOrder('bar') Traceback (most recent call last): ... TypeError: order must be a tuple or a list. >>> oc.updateOrder(['baz', 'zork', 'quux']) Traceback (most recent call last): ... ValueError: Incompatible key set. >>> del oc['baz'] >>> del oc['zork'] >>> del oc['foo'] >>> len(oc) 0
values()
See IOrderedContainer.
>>> oc = OrderedContainer() >>> oc.keys() [] >>> oc['foo'] = 'bar' >>> oc.values() ['bar'] >>> oc['baz'] = 'quux' >>> oc.values() ['bar', 'quux'] >>> int(len(oc._order) == len(oc._data)) 1
There are no known subclasses.