Esempio n. 1
0
 def requestAvatarId(self, credentials):
     if not pamauth:
         return defer.fail(error.UnauthorizedLogin())
     d = pamauth.pamAuthenticate(self.service, credentials.username,
                                 credentials.pamConversion)
     d.addCallback(lambda x: credentials.username)
     return d
Esempio n. 2
0
 def requestAvatarId(self, credentials):
     if not pamauth:
         return defer.fail(error.UnauthorizedLogin())
     d = pamauth.pamAuthenticate(self.service, credentials.username,
                                 credentials.pamConversion)
     d.addCallback(lambda x: credentials.username)
     return d
 def requestAvatarId(self, credentials):
     try:
         from twisted.cred import pamauth
     except ImportError:  # PyPAM is missing
         return defer.fail(error.UnauthorizedLogin())
     else:
         d = pamauth.pamAuthenticate(self.service, credentials.username, credentials.pamConversion)
         d.addCallback(lambda x: credentials.username)
         return d
Esempio n. 4
0
 def requestAvatarId(self, credentials):
     try:
         from twisted.cred import pamauth
     except ImportError:  # PyPAM is missing
         return defer.fail(error.UnauthorizedLogin())
     else:
         d = pamauth.pamAuthenticate(self.service, credentials.username,
                                     credentials.pamConversion)
         d.addCallback(lambda x: credentials.username)
         return d