diff options
author | Stef Walter <stef@memberwebs.com> | 2006-05-10 21:58:16 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2006-05-10 21:58:16 +0000 |
commit | 0311bd877289e6a5074b6a54b58ee72e9f5fdbac (patch) | |
tree | d8f206c23554b8be2c89b1dcd06a2b4ca13dca92 /java | |
parent | 8e3c0a10ae7a4c769573e9fa66b15339ab92acdc (diff) |
Add NullRealm for it's handiness.
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 + } +} |