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

« back to all changes in this revision

Viewing changes to twisted/cred/checkers.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-02-22 22:52:47 UTC
  • Revision ID: james.westby@ubuntu.com-20060222225247-0mjb8ij9473m5zse
Tags: 2.2.0-1ubuntu1
Synchronize with Debian unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
from __future__ import generators
6
6
 
 
7
import os
 
8
 
7
9
from zope import interface
8
 
from twisted.internet import reactor, threads, defer
 
10
 
 
11
from twisted.internet import defer
9
12
from twisted.python import components, failure, log
10
13
from twisted.cred import error, credentials
11
 
import os
12
14
 
13
15
try:
14
16
    from twisted.cred import pamauth
249
251
    
250
252
    def requestAvatarId(self, credentials):
251
253
        if not pamauth:
252
 
            return defer.fail(UnauthorizedLogin())
 
254
            return defer.fail(error.UnauthorizedLogin())
253
255
        d = pamauth.pamAuthenticate(self.service, credentials.username,
254
256
                                    credentials.pamConversion)
255
257
        d.addCallback(lambda x: credentials.username)