1 package org.apache.geronimo.jetty;
2
3 import java.io.IOException;
4 import java.security.Principal;
5
6 import org.mortbay.http.Authenticator;
7 import org.mortbay.http.HttpRequest;
8 import org.mortbay.http.HttpResponse;
9 import org.mortbay.http.UserRealm;
10
11 /**
12 * Authenticator that always denies, returning null. Useful when you need to install a default principal/subject
13 * in an unsecured web app.
14 */
15 public class NonAuthenticator implements Authenticator {
16 public Principal authenticate(UserRealm realm, String pathInContext, HttpRequest request, HttpResponse response) throws IOException {
17 return null;
18 }
19
20 public String getAuthMethod() {
21 return "None";
22 }
23 }