I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 53c7ff14 authored by jrandom's avatar jrandom Committed by zzz
Browse files

code reuse++ (digest authentication works, nice find oOo!)

parent 6b993688
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ import net.i2p.apps.systray.SysTray;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.servlet.WebApplicationContext;
import org.mortbay.http.DigestAuthenticator;
import org.mortbay.http.handler.SecurityHandler;
import org.mortbay.http.HashUserRealm;
import org.mortbay.http.HttpRequest;
......@@ -66,6 +67,7 @@ public class RouterConsoleRunner {
realm.put("admin", password);
realm.addUserToRole("admin", "routerAdmin");
context.setRealm(realm);
context.setAuthenticator(new DigestAuthenticator());
context.addHandler(0, new SecurityHandler());
SecurityConstraint constraint = new SecurityConstraint("admin", "routerAdmin");
constraint.setAuthenticate(true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment