|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.caucho.http.security.AuthenticatorAdapter
Adapter for old-style authentication.
Constructor Summary | |
AuthenticatorAdapter(Authenticator auth,
RegistryNode registry,
Application app)
|
Method Summary | |
java.security.Principal |
getUserPrincipal(HttpServletRequest request,
HttpServletResponse response,
ServletContext application)
Gets the authenticated user for the current request. |
void |
init()
Initialize the authenticator. |
boolean |
isUserInRole(HttpServletRequest request,
HttpServletResponse response,
ServletContext application,
java.security.Principal user,
java.lang.String role)
Returns true if the user plays the named role. |
java.security.Principal |
login(HttpServletRequest request,
HttpServletResponse response,
ServletContext application,
java.lang.String user,
java.lang.String password)
Logs a user in with a user name and a password. |
java.security.Principal |
loginDigest(HttpServletRequest request,
HttpServletResponse response,
ServletContext app,
java.lang.String user,
java.lang.String realm,
java.lang.String nonce,
java.lang.String uri,
java.lang.String qop,
java.lang.String nc,
java.lang.String cnonce,
byte[] clientDigest)
Returns the digest secret for Digest authentication. |
void |
logout(HttpServletRequest request,
HttpServletResponse response,
ServletContext application,
java.security.Principal user)
Logs the user out from the given request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AuthenticatorAdapter(Authenticator auth, RegistryNode registry, Application app)
Method Detail |
public void init() throws ServletException
init
in interface ServletAuthenticator
public java.security.Principal login(HttpServletRequest request, HttpServletResponse response, ServletContext application, java.lang.String user, java.lang.String password) throws ServletException
login
in interface ServletAuthenticator
request
- servlet requestresponse
- servlet response, in case any cookie need sending.application
- servlet applicationuser
- the user name.password
- the user's presented password.public java.security.Principal loginDigest(HttpServletRequest request, HttpServletResponse response, ServletContext app, java.lang.String user, java.lang.String realm, java.lang.String nonce, java.lang.String uri, java.lang.String qop, java.lang.String nc, java.lang.String cnonce, byte[] clientDigest) throws ServletException
ServletAuthenticator
A1 = MD5(username + ':' + realm + ':' + password)
A2 = MD5(method + ':' + uri)
digest = MD5(A1 + ':' + nonce + A2)
loginDigest
in interface ServletAuthenticator
com.caucho.http.security.ServletAuthenticator
request
- the request trying to authenticate.response
- the response for setting headers and cookies.application
- the servlet contextusername
- the usernamerealm
- the realmpublic java.security.Principal getUserPrincipal(HttpServletRequest request, HttpServletResponse response, ServletContext application) throws ServletException
getUserPrincipal
in interface ServletAuthenticator
request
- the request trying to authenticate.application
- the servlet contextpublic boolean isUserInRole(HttpServletRequest request, HttpServletResponse response, ServletContext application, java.security.Principal user, java.lang.String role) throws ServletException
isUserInRole
in interface ServletAuthenticator
request
- the request testing the role.user
- the user's Principal.role
- role name.public void logout(HttpServletRequest request, HttpServletResponse response, ServletContext application, java.security.Principal user) throws ServletException
Generally only called from user code.
logout
in interface ServletAuthenticator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |