~certify-web-dev/twisted/certify-trunk

« back to all changes in this revision

Viewing changes to twisted/cred/portal.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-01-17 14:52:35 UTC
  • mfrom: (1.1.5 upstream) (2.1.2 etch)
  • Revision ID: james.westby@ubuntu.com-20070117145235-btmig6qfmqfen0om
Tags: 2.5.0-0ubuntu1
New upstream version, compatible with python2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
 
11
11
from twisted.internet import defer
12
12
from twisted.internet.defer import maybeDeferred
13
 
from twisted.python import failure, reflect, components
 
13
from twisted.python import failure, reflect
14
14
from twisted.cred import error
15
 
from zope import interface
16
 
 
17
 
 
18
 
class IRealm(components.Interface):
 
15
from zope.interface import providedBy, Interface
 
16
 
 
17
 
 
18
class IRealm(Interface):
19
19
    """
20
20
    The realm connects application-specific objects to the
21
21
    authentication system.
22
22
    """
23
 
    def requestAvatar(self, avatarId, mind, *interfaces):
 
23
    def requestAvatar(avatarId, mind, *interfaces):
24
24
        """Return avatar implementing one of the given interfaces.
25
25
 
26
26
        @param avatarId: a string that identifies an avatar, as returned by
102
102
        this will not be in connectionLost (such as in a web-based session), it
103
103
        will always be at the end of a user's interactive session.
104
104
        """
105
 
        ifac = interface.providedBy(credentials)
 
105
        ifac = providedBy(credentials)
106
106
        for i in ifac:
107
107
            c = self.checkers.get(i)
108
108
            if c is not None: