Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-jams
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-jams
Commits
a07724ab
Commit
a07724ab
authored
4 years ago
by
Felix Sidokhine
Browse files
Options
Downloads
Patches
Plain Diff
minor code cleanup
parent
e5fdf59d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
jams-server/src/main/java/net/jami/jams/server/Server.java
+14
-19
14 additions, 19 deletions
jams-server/src/main/java/net/jami/jams/server/Server.java
with
14 additions
and
19 deletions
jams-server/src/main/java/net/jami/jams/server/Server.java
+
14
−
19
View file @
a07724ab
...
...
@@ -32,7 +32,11 @@ public class Server {
public
static
CertificateAuthority
certificateAuthority
;
public
static
UserAuthenticationModule
userAuthenticationModule
;
public
static
void
main
(
String
[]
args
){
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
){
log
.
error
(
"Could not load and inject active directory connector with error: "
+
e
.
toString
());
}
//Start tomcat.
TomcatLauncher
tomcatLauncher
=
new
TomcatLauncher
();
tomcatLauncher
.
startServer
();
//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
)
{
log
.
error
(
"Could not load and inject active directory connector with error: "
+
e
.
toString
());
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment