Exemplo 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
Exemplo 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
Exemplo n.º 3
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
Exemplo 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