diff options
Diffstat (limited to 'java')
-rw-r--r-- | java/src/com/memberwebs/httpauth/jetty/NullRealm.java | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/java/src/com/memberwebs/httpauth/jetty/NullRealm.java b/java/src/com/memberwebs/httpauth/jetty/NullRealm.java new file mode 100644 index 0000000..43b0d2e --- /dev/null +++ b/java/src/com/memberwebs/httpauth/jetty/NullRealm.java @@ -0,0 +1,41 @@ +package com.memberwebs.httpauth.jetty; + +import org.mortbay.http.HttpRequest; +import org.mortbay.http.UserPrincipal; +import org.mortbay.http.UserRealm; + +public class NullRealm implements UserRealm +{ + public String getName() + { + return "null-realm"; + } + + public UserPrincipal authenticate(String username, Object credentials, HttpRequest request) + { + // We don't do any authentication + return null; + } + + public void disassociate(UserPrincipal user) + { + // We don't do any authentication + } + + public UserPrincipal pushRole(UserPrincipal user, String role) + { + // We don't do any authentication + return null; + } + + public UserPrincipal popRole(UserPrincipal user) + { + // We don't do any authentication + return null; + } + + public void logout(UserPrincipal user) + { + // We don't do any authentication + } +} |