WebAuthentication.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. Asynchronous WebServer library for Espressif MCUs
  3. Copyright (c) 2016 Hristo Gochkov. All rights reserved.
  4. This file is part of the esp8266 core for Arduino environment.
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public
  7. License as published by the Free Software Foundation; either
  8. version 2.1 of the License, or (at your option) any later version.
  9. This library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. */
  17. #ifndef WEB_AUTHENTICATION_H_
  18. #define WEB_AUTHENTICATION_H_
  19. #include "Arduino.h"
  20. bool checkBasicAuthentication(const char * header, const char * username, const char * password);
  21. String requestDigestAuthentication(const char * realm);
  22. bool checkDigestAuthentication(const char * header, const char * method, const char * username, const char * password, const char * realm, bool passwordIsHash, const char * nonce, const char * opaque, const char * uri);
  23. //for storing hashed versions on the device that can be authenticated against
  24. String generateDigestHash(const char * username, const char * password, const char * realm);
  25. #endif