|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.security.AbstractLogin
com.caucho.server.security.DigestLogin
public class DigestLogin
Implements the "digest" auth-method. Basic uses the HTTP authentication with WWW-Authenticate and SC_UNAUTHORIZE.
| Field Summary | |
|---|---|
protected java.lang.String |
_realm
|
| Fields inherited from class com.caucho.server.security.AbstractLogin |
|---|
_auth, log |
| Constructor Summary | |
|---|---|
DigestLogin()
|
|
| Method Summary | |
|---|---|
java.security.Principal |
authenticate(HttpServletRequest request,
HttpServletResponse response,
ServletContext application)
Logs a user in with a user name and a password. |
protected byte[] |
decodeDigest(java.lang.String digest)
|
java.lang.String |
getAuthType()
Returns the authentication type. |
protected java.security.Principal |
getDigestPrincipal(HttpServletRequest request,
HttpServletResponse response,
ServletContext application)
Returns the principal from a basic authentication |
protected long |
getRandomLong(ServletContext application)
|
java.lang.String |
getRealmName()
Gets the realm. |
java.security.Principal |
getUserPrincipal(HttpServletRequest request,
HttpServletResponse response,
ServletContext application)
Returns the current user with the user name and password. |
protected java.lang.String |
scanKey(CharCursor cursor)
|
protected java.lang.String |
scanValue(CharCursor cursor)
|
protected void |
sendDigestChallenge(HttpServletResponse res,
ServletContext application)
Sends a challenge for basic authentication. |
void |
setRealmName(java.lang.String realm)
Sets the login realm. |
protected void |
skipWhitespace(CharCursor cursor)
|
| Methods inherited from class com.caucho.server.security.AbstractLogin |
|---|
getAuthenticator, init, isUserInRole, logout, setAuthenticator, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String _realm
| Constructor Detail |
|---|
public DigestLogin()
| Method Detail |
|---|
public void setRealmName(java.lang.String realm)
public java.lang.String getRealmName()
public java.lang.String getAuthType()
getAuthType in class AbstractLogin
public java.security.Principal authenticate(HttpServletRequest request,
HttpServletResponse response,
ServletContext application)
throws ServletException,
java.io.IOException
authenticate in class AbstractLoginrequest - servlet requestresponse - servlet response, in case any cookie need sending.application - servlet application
ServletException
java.io.IOException
public java.security.Principal getUserPrincipal(HttpServletRequest request,
HttpServletResponse response,
ServletContext application)
throws ServletException
getUserPrincipal in class AbstractLoginrequest - servlet requestresponse - servlet response, in case any cookie need sending.application - servlet application
ServletException
protected void sendDigestChallenge(HttpServletResponse res,
ServletContext application)
throws ServletException,
java.io.IOException
ServletException
java.io.IOExceptionprotected long getRandomLong(ServletContext application)
protected java.security.Principal getDigestPrincipal(HttpServletRequest request,
HttpServletResponse response,
ServletContext application)
throws ServletException
auth - the authenticator for this application.
ServletExceptionprotected byte[] decodeDigest(java.lang.String digest)
protected java.lang.String scanKey(CharCursor cursor)
throws ServletException
ServletException
protected java.lang.String scanValue(CharCursor cursor)
throws ServletException
ServletExceptionprotected void skipWhitespace(CharCursor cursor)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||