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:
parent
14448e01a2
commit
c392f79237
@ -9,6 +9,7 @@
|
|||||||
#define DEFAULT_LOG_LEVEL LogLevel::info
|
#define DEFAULT_LOG_LEVEL LogLevel::info
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEFAULT_TOKEN_TIMEOUT (60*5)
|
||||||
#define DEFAULT_PORT 5555
|
#define DEFAULT_PORT 5555
|
||||||
#define DEFAULT_WEB_PREFIX "https://lock.binary.kitchen/"
|
#define DEFAULT_WEB_PREFIX "https://lock.binary.kitchen/"
|
||||||
#define DEFAULT_LDAP_SERVER "ldaps://ldap.binary.kitchen"
|
#define DEFAULT_LDAP_SERVER "ldaps://ldap.binary.kitchen"
|
||||||
|
8
main.cpp
8
main.cpp
@ -97,15 +97,17 @@ int main(int argc, char** argv)
|
|||||||
string lockPagePrefix;
|
string lockPagePrefix;
|
||||||
string allowedIpPrefix;
|
string allowedIpPrefix;
|
||||||
|
|
||||||
|
l(LogLevel::notice, "Starting doorlockd");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
unsigned int timeout;
|
unsigned int timeout;
|
||||||
po::options_description desc("usage: doorlockd");
|
po::options_description desc("usage: doorlockd");
|
||||||
desc.add_options()
|
desc.add_options()
|
||||||
("help,h", "print help")
|
("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")
|
("port,p", po::value<short>(&port)->default_value(DEFAULT_PORT), "Port")
|
||||||
("ldap,l", po::value<string>(&ldapServer)->default_value(DEFAULT_LDAP_SERVER), "Ldap Server")
|
("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")
|
("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");
|
("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,
|
lockPagePrefix,
|
||||||
allowedIpPrefix));
|
allowedIpPrefix));
|
||||||
|
|
||||||
l(LogLevel::notice, "Starting doorlockd");
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
boost::asio::io_service io_service;
|
boost::asio::io_service io_service;
|
||||||
server s(io_service, port);
|
server s(io_service, port);
|
||||||
|
Loading…
Reference in New Issue
Block a user