parameters: (cls, db, uid, passwd)
docstring: Verifies that the given (uid, password) is authorized for the database ``db`` and
             raise an exception if it is not.
docstring_summary: Verifies that the given (uid, password) is authorized for the database ``db`` and
             raise an exception if it is not.
docstring_tokens: Verifies that the given ( uid password ) is authorized for the database db and raise an exception if it is not .
function: def check(cls, db, uid, passwd):
          """Verifies that the given (uid, password) is authorized for the database ``db`` and
             raise an exception if it is not."""
          if not passwd:
              # empty passwords disallowed for obvious security reasons
              raise AccessDenied()
  
          with contextlib.closing(cls.pool.cursor()) as cr:
              self = api.Environment(cr, uid, {})[cls._name]
              with self._assert_can_auth():
                  if not self.env.user.active:
                      raise AccessDenied()
                  self._check_credentials(passwd, {'interactive': False})
function_tokens: def check ( cls , db , uid , passwd ) : if not passwd : # empty passwords disallowed for obvious security reasons raise AccessDenied ( ) with contextlib . closing ( cls . pool . cursor ( ) ) as cr : self = api . Environment ( cr , uid , { } ) [ cls . _name ] with self . _assert_can_auth ( ) : if not self . env . user . active : raise AccessDenied ( ) self . _check_credentials ( passwd , { 'interactive' : False } )