'Check the current authentication parameters to know if those are still
valid. This method should be called at each request. If the
authentication fails, a :exc:`SessionExpiredException` is raised.'

def check_security(self):

    if ((not self.db) or (not self.uid)):
        raise SessionExpiredException('Session    expired')
    security.check(self.db, self.uid, self.password)
