|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.security.AbstractAuthenticator
com.caucho.server.security.AbstractAuthenticator
public class AbstractAuthenticator
All applications should extend AbstractAuthenticator to implement their custom authenticators. While this isn't absolutely required, it protects implementations from API changes.
The AbstractAuthenticator provides a single-signon cache. Users logged into one web-app will share the same principal.
Field Summary |
---|
Fields inherited from class com.caucho.security.AbstractAuthenticator |
---|
_passwordDigest, _passwordDigestAlgorithm, _passwordDigestRealm, NULL_USER |
Constructor Summary | |
---|---|
AbstractAuthenticator()
|
Method Summary | |
---|---|
java.security.Principal |
authenticate(java.security.Principal principal,
PasswordCredentials cred,
java.lang.Object details)
Main authenticator API. |
protected java.security.Principal |
getUserPrincipal(HttpServletRequest request,
HttpServletResponse response,
ServletContext app)
Backward compatiblity call |
boolean |
isUserInRole(HttpServletRequest request,
HttpServletResponse response,
ServletContext application,
java.security.Principal user,
java.lang.String role)
|
boolean |
isUserInRole(java.security.Principal user,
java.lang.String role)
Returns true if the user plays the named role. |
protected java.security.Principal |
login(HttpServletRequest request,
HttpServletResponse response,
ServletContext app)
Backward compatiblity call |
protected java.security.Principal |
login(HttpServletRequest request,
HttpServletResponse response,
ServletContext app,
java.lang.String userName,
java.lang.String password)
Backward compatiblity call |
protected java.security.Principal |
loginImpl(HttpServletRequest request,
HttpServletResponse response,
ServletContext app,
java.lang.String userName,
java.lang.String password)
Backward compatiblity call |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractAuthenticator()
Method Detail |
---|
public java.security.Principal authenticate(java.security.Principal principal, PasswordCredentials cred, java.lang.Object details)
authenticate
in class AbstractAuthenticator
protected java.security.Principal login(HttpServletRequest request, HttpServletResponse response, ServletContext app, java.lang.String userName, java.lang.String password) throws ServletException
ServletException
protected java.security.Principal loginImpl(HttpServletRequest request, HttpServletResponse response, ServletContext app, java.lang.String userName, java.lang.String password) throws ServletException
ServletException
protected java.security.Principal getUserPrincipal(HttpServletRequest request, HttpServletResponse response, ServletContext app) throws ServletException
ServletException
protected java.security.Principal login(HttpServletRequest request, HttpServletResponse response, ServletContext app) throws ServletException
ServletException
public boolean isUserInRole(java.security.Principal user, java.lang.String role)
isUserInRole
in interface Authenticator
isUserInRole
in class AbstractAuthenticator
request
- the servlet requestuser
- the user to testrole
- the role to testpublic boolean isUserInRole(HttpServletRequest request, HttpServletResponse response, ServletContext application, java.security.Principal user, java.lang.String role) throws ServletException
ServletException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |