Mercurial > hg > orthanc
diff Core/HttpServer/MongooseServer.h @ 25:dd1489098265
basic http authentication
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 28 Aug 2012 11:20:49 +0200 |
parents | 166664f0f860 |
children | 96e57b863dd9 |
line wrap: on
line diff
--- a/Core/HttpServer/MongooseServer.h Tue Aug 28 10:42:43 2012 +0200 +++ b/Core/HttpServer/MongooseServer.h Tue Aug 28 11:20:49 2012 +0200 @@ -44,6 +44,7 @@ typedef std::set<std::string> RegisteredUsers; RegisteredUsers registeredUsers_; + bool authentication_; bool ssl_; std::string certificate_; uint16_t port_; @@ -66,11 +67,20 @@ void Stop(); + void ClearUsers(); + void RegisterUser(const char* username, const char* password); void RegisterHandler(HttpHandler* handler); // This takes the ownership + bool IsAuthenticationEnabled() const + { + return authentication_; + } + + void SetAuthenticationEnabled(bool enabled); + bool IsSslEnabled() const { return ssl_; @@ -91,5 +101,7 @@ HttpHandler* FindHandler(const UriComponents& forUri) const; ChunkStore& GetChunkStore(); + + bool IsValidBasicHttpAuthentication(const std::string& basic) const; }; }