From 0311bd877289e6a5074b6a54b58ee72e9f5fdbac Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 10 May 2006 21:58:16 +0000 Subject: Add NullRealm for it's handiness. --- .../com/memberwebs/httpauth/jetty/NullRealm.java | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 java/src/com/memberwebs/httpauth/jetty/NullRealm.java 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 + } +} -- cgit v1.2.3