|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.security.AbstractAuthenticator
com.caucho.server.security.AbstractPasswordAuthenticator
public abstract class AbstractPasswordAuthenticator
Base class for authenticators which lookup passwords from a database.
Implementations only need to override the getUser method
and return a populated PasswordUser. Since
PasswordUser already contains role information, the
abstract authenticator can handle any authentication or authorization.
| Field Summary |
|---|
| Fields inherited from class com.caucho.server.security.AbstractAuthenticator |
|---|
_passwordDigest, _passwordDigestAlgorithm, _passwordDigestRealm, _principalCache, _principalCacheSize, LOGIN_NAME |
| Constructor Summary | |
|---|---|
AbstractPasswordAuthenticator()
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
getDigestPassword(HttpServletRequest request,
HttpServletResponse response,
ServletContext application,
java.lang.String userName,
java.lang.String realm)
Default implementation of basic username/password login |
protected PasswordUser |
getUser(java.security.Principal principal)
Returns the user based on a principal |
protected abstract PasswordUser |
getUser(java.lang.String userName)
Abstract method to retrn a user based on the name |
boolean |
isUserInRole(HttpServletRequest request,
HttpServletResponse response,
ServletContext application,
java.security.Principal principal,
java.lang.String role)
Default implementation to return true if the user is in a role |
protected java.security.Principal |
loginImpl(HttpServletRequest request,
HttpServletResponse response,
ServletContext application,
java.lang.String userName,
java.lang.String password)
Default implementation of basic username/password login |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractPasswordAuthenticator()
| Method Detail |
|---|
protected abstract PasswordUser getUser(java.lang.String userName)
userName - the string user name
protected PasswordUser getUser(java.security.Principal principal)
protected java.security.Principal loginImpl(HttpServletRequest request,
HttpServletResponse response,
ServletContext application,
java.lang.String userName,
java.lang.String password)
throws ServletException
loginImpl in class AbstractAuthenticatorServletException
protected java.lang.String getDigestPassword(HttpServletRequest request,
HttpServletResponse response,
ServletContext application,
java.lang.String userName,
java.lang.String realm)
throws ServletException
getDigestPassword in class AbstractAuthenticatorServletException
public boolean isUserInRole(HttpServletRequest request,
HttpServletResponse response,
ServletContext application,
java.security.Principal principal,
java.lang.String role)
throws ServletException
isUserInRole in interface ServletAuthenticatorisUserInRole in class AbstractAuthenticatorrequest - the servlet requestuser - the user to testrole - the role to test
ServletException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||