|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.spy.SpyObject
net.spy.jwebkit.auth.SimpleAuthAdaptor
public class SimpleAuthAdaptor
PasswordCheckingAuthAdaptor that returns true for any user when the role is
authenticated,
and returns a Principal for any user with the password
of mypass.
This exists for testing, probably not useful otherwise.
| Field Summary | |
|---|---|
static java.lang.String |
VALID_PASS
|
static java.lang.String |
VALID_ROLE
|
| Constructor Summary | |
|---|---|
SimpleAuthAdaptor()
|
|
| Method Summary | |
|---|---|
java.security.Principal |
checkPassword(java.lang.String user,
java.lang.String pass)
Return a Principal representing the given username if the given password is considered valid for the given user. |
void |
didAuthenticate(java.security.Principal p,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Invoked after a user-agent has successfully authenticated. |
java.lang.String |
getHA1(java.lang.String username,
java.lang.String realm)
Get the HA1string for authentication. |
void |
init(javax.servlet.FilterConfig conf)
Initialize this AuthAdaptor with the given filter config. |
boolean |
isPrincipalInRole(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
javax.servlet.ServletContext context,
java.security.Principal user,
java.lang.String role)
Determine whether the given Principal is in the given role. |
| Methods inherited from class net.spy.SpyObject |
|---|
getLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String VALID_ROLE
public static final java.lang.String VALID_PASS
| Constructor Detail |
|---|
public SimpleAuthAdaptor()
| Method Detail |
|---|
public void init(javax.servlet.FilterConfig conf)
AuthAdaptor
init in interface AuthAdaptorconf - the filter config
public boolean isPrincipalInRole(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
javax.servlet.ServletContext context,
java.security.Principal user,
java.lang.String role)
AuthAdaptor
isPrincipalInRole in interface AuthAdaptorreq - servlet requestres - servlet responsecontext - the servlet contextuser - the Principarole - the role we need
public java.security.Principal checkPassword(java.lang.String user,
java.lang.String pass)
throws javax.servlet.ServletException
PasswordCheckingAuthAdaptor
checkPassword in interface PasswordCheckingAuthAdaptoruser - the usernamepass - the password
javax.servlet.ServletException - if something goes wrong
public java.lang.String getHA1(java.lang.String username,
java.lang.String realm)
DigestSupportAuthAdaptorHA1string for authentication. This string is computed by concatenating the username, the realm, and the password with colons, and then returning the hex encoded digest of this value.
getHA1 in interface DigestSupportAuthAdaptor
public void didAuthenticate(java.security.Principal p,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
AuthAdaptor
didAuthenticate in interface AuthAdaptorp - the principalreq - the requestres - the response
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||