twisted.words.service.WordsRealm(object) class documentationtwisted.words.service
(View In Hierarchy)
Known subclasses: twisted.words.service.InMemoryWordsRealm
Implements interfaces: twisted.cred.portal.IRealm, twisted.words.iwords.IChatService
| Method | __init__ | Undocumented | 
| Method | userFactory | Undocumented | 
| Method | groupFactory | Undocumented | 
| Method | logoutFactory | Undocumented | 
| Method | requestAvatar | Return avatar which provides one of the given interfaces. | 
| Method | lookupUser | Undocumented | 
| Method | lookupGroup | Retrieve a group by name. | 
| Method | addUser | Add the given user to this service. | 
| Method | addGroup | Add the given group to this service. | 
| Method | getGroup | Retrieve the group by the given name. | 
| Method | getUser | Retrieve the user by the given name. | 
| Method | createUser | Create a new user with the given name. | 
| Method | createGroup | Create a new group with the given name. | 
Return avatar which provides one of the given interfaces.
| Parameters | avatarId | a string that identifies an avatar, as returned by ICredentialsChecker.requestAvatarId(via a Deferred).  Alternatively, it may betwisted.cred.checkers.ANONYMOUS. | 
| mind | usually None.  See the description of mind in Portal.login. | |
| interfaces | the interface(s) the returned avatar should implement, e.g. IMailAccount.  See the description ofPortal.login. | |
| Returns | a deferred which will fire a tuple of (interface, avatarAspect, logout), or the tuple itself. The interface will be one of the interfaces passed in the 'interfaces' argument. The 'avatarAspect' will implement that interface. The 'logout' object is a callable which will detach the mind from the avatar. | |
Retrieve a group by name.
Unlike getGroup, this will never implicitly create a 
group.
| Returns | A Deferred which fires with the group by the given name, or which fails 
with twisted.words.ewords.NoSuchGroup. (type:twisted.internet.defer.Deferred) | |
Add the given user to this service.
This is an internal method intended to be overridden by WordsRealm 
subclasses, not called by external code.
| Returns | A Deferred which fires with Nonewhen the user is added, or which fails withtwisted.words.ewords.DuplicateUserif a user with the same name exists already. (type:twisted.internet.defer.Deferred) | |
Add the given group to this service.
| Returns | A Deferred which fires with Nonewhen the group is added, or which fails withtwisted.words.ewords.DuplicateGroupif a group with the same name exists already. (type:twisted.internet.defer.Deferred) | |
Retrieve the group by the given name.
| Returns | A Deferred which fires with the group with the given name if one exists (or
if one is created due to the setting of IChatService.createGroupOnRequest,
or which fails withtwisted.words.ewords.NoSuchGroupif no such group exists. (type:twisted.internet.defer.Deferred) | |
Retrieve the user by the given name.
| Returns | A Deferred which fires with the user with the given name if one exists (or 
if one is created due to the setting of IChatService.createUserOnRequest,
or which fails withtwisted.words.ewords.NoSuchUserif no such user exists. (type:twisted.internet.defer.Deferred) | |
Create a new user with the given name.
| Returns | A Deferred which fires with the created user, or with fails with twisted.words.ewords.DuplicateUserif a user by that name exists already. (type:twisted.internet.defer.Deferred) | |
Create a new group with the given name.
| Returns | A Deferred which fires with the created group, or with fails with twisted.words.ewords.DuplicateGroupif a group by that name exists already. (type:twisted.internet.defer.Deferred) | |