Skip to content
Snippets Groups Projects
Commit a07724ab authored by Felix Sidokhine's avatar Felix Sidokhine
Browse files

minor code cleanup

parent e5fdf59d
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,10 @@ public class Server {
public static UserAuthenticationModule userAuthenticationModule;
public static void main(String[] args) {
//Start tomcat.
TomcatLauncher tomcatLauncher = new TomcatLauncher();
tomcatLauncher.startServer();
//Pre-load the libraries we should pre-load.
LibraryLoader.loadlibs("libs");
//Step 1: Create the data store.
......@@ -42,23 +46,14 @@ public class Server {
//Step 2: if the server is initialized,
certificateAuthority = CryptoEngineLoader.loadCryptoEngine(dataStore);
//nasty injection to test this flow.
//Okay this is me cheating again heavily, just for testing purposes.
try {
InputStream path;
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
path = classLoader.getResourceAsStream("ldapconfig.json");
userAuthenticationModule.attachLDAPAuthSource(new String(path.readAllBytes()));
}
catch (Exception e){
} catch (Exception e) {
log.error("Could not load and inject active directory connector with error: " + e.toString());
}
//Start tomcat.
TomcatLauncher tomcatLauncher = new TomcatLauncher();
tomcatLauncher.startServer();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment