Пример #1
0
 def authenticate(self, client_id, username, password):
     self.logger.debug('authenticating client:%s user:%s' %
                       (client_id, username))
     if username in self.auth and self.auth[username].check_pw(password):
         return self.auth[username].authorization
     else:
         return Authorization.denied()
Пример #2
0
 def authenticate(self, client_id, username, password):
     self.logger.debug('authenticating client:%s user:%s' %
                       (client_id, username))
     result = yield self._request_authorization(client_id, username, password)
     if result:
         return self.make_authorization(username, result)
     else:
         return Authorization.denied()
Пример #3
0
 def authenticate(self, client_id, username, password):
     self.logger.debug('authenticating client:%s user:%s' %
                       (client_id, username))
     result = yield self._request_authorization(client_id, username,
                                                password)
     if result:
         return self.make_authorization(username, result)
     else:
         return Authorization.denied()