Mercurial > hg > orthanc
comparison PalantirServer/main.cpp @ 25:dd1489098265
basic http authentication
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 28 Aug 2012 11:20:49 +0200 |
parents | 62bd05fe4b7c |
children | 6ba765ecf3db |
comparison
equal
deleted
inserted
replaced
24:166664f0f860 | 25:dd1489098265 |
---|---|
121 | 121 |
122 // HTTP server | 122 // HTTP server |
123 MongooseServer httpServer; | 123 MongooseServer httpServer; |
124 httpServer.SetPort(GetGlobalIntegerParameter("HttpPort", 8000)); | 124 httpServer.SetPort(GetGlobalIntegerParameter("HttpPort", 8000)); |
125 | 125 |
126 httpServer.SetAuthenticationEnabled(GetGlobalBoolParameter("AuthenticationEnabled", false)); | |
127 SetupRegisteredUsers(httpServer); | |
128 | |
126 if (GetGlobalBoolParameter("SslEnabled", false)) | 129 if (GetGlobalBoolParameter("SslEnabled", false)) |
127 { | 130 { |
128 std::string certificate = GetGlobalStringParameter("SslCertificate", "certificate.pem"); | 131 std::string certificate = GetGlobalStringParameter("SslCertificate", "certificate.pem"); |
129 httpServer.SetSslEnabled(true); | 132 httpServer.SetSslEnabled(true); |
130 httpServer.SetSslCertificate(certificate.c_str()); | 133 httpServer.SetSslCertificate(certificate.c_str()); |