1
0
mirror of https://github.com/binary-kitchen/doorlockd synced 2024-12-22 10:24:26 +01:00

defaulted token timout to 5 minutes

This commit is contained in:
Ralf Ramsauer 2015-05-13 14:50:44 +00:00
parent 14448e01a2
commit c392f79237
2 changed files with 5 additions and 4 deletions

View File

@ -9,6 +9,7 @@
#define DEFAULT_LOG_LEVEL LogLevel::info
#endif
#define DEFAULT_TOKEN_TIMEOUT (60*5)
#define DEFAULT_PORT 5555
#define DEFAULT_WEB_PREFIX "https://lock.binary.kitchen/"
#define DEFAULT_LDAP_SERVER "ldaps://ldap.binary.kitchen"

View File

@ -97,15 +97,17 @@ int main(int argc, char** argv)
string lockPagePrefix;
string allowedIpPrefix;
l(LogLevel::notice, "Starting doorlockd");
try {
unsigned int timeout;
po::options_description desc("usage: doorlockd");
desc.add_options()
("help,h", "print help")
("tokentimeout,t", po::value<unsigned int>(&timeout)->required(), "tokentimeout in seconds")
("tokentimeout,t", po::value<unsigned int>(&timeout)->default_value(DEFAULT_TOKEN_TIMEOUT), "Token timeout in seconds")
("port,p", po::value<short>(&port)->default_value(DEFAULT_PORT), "Port")
("ldap,l", po::value<string>(&ldapServer)->default_value(DEFAULT_LDAP_SERVER), "Ldap Server")
("bidndn,b", po::value<string>(&bindDN)->default_value(DEFAULT_BINDDN), "Bind DN %s means username")
("bidndn,b", po::value<string>(&bindDN)->default_value(DEFAULT_BINDDN), "Bind DN, %s means username")
("web,w", po::value<string>(&lockPagePrefix)->default_value(DEFAULT_WEB_PREFIX), "Prefix of the webpage")
("ip,i", po::value<string>(&allowedIpPrefix)->default_value(DEFAULT_ALLOWED_IP_PREFIX), "Default allowed IP Prefix");
@ -135,8 +137,6 @@ int main(int argc, char** argv)
lockPagePrefix,
allowedIpPrefix));
l(LogLevel::notice, "Starting doorlockd");
try {
boost::asio::io_service io_service;
server s(io_service, port);