Няма описание
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526
  1. from lodel import logger
  2. ##@brief Handles common errors on authentication
  3. class AuthenticationError(Exception):
  4. pass
  5. ##@brief Handles authentication error with possible security issue
  6. #
  7. #@note Handle the creation of a security log message containing client info
  8. class AuthenticationSecurityError(AuthenticationError):
  9. def __init__(self, client):
  10. msg = "%s : authentication error" % client
  11. logger.security(msg)
  12. super().__init__(msg)
  13. ##@brief Handles authentication failure
  14. #
  15. #@note Handle the creation of a security log message containing client info
  16. class AuthenticationFailure(Exception):
  17. def __init__(self, client):
  18. msg = "%s : authentication failure" % client
  19. logger.security(msg)
  20. super().__init__(msg)