|
||||||||||
| 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.BasicLogin
public class BasicLogin
Implements the "basic" 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 | |
|---|---|
BasicLogin()
|
|
| Method Summary | |
|---|---|
java.security.Principal |
authenticate(HttpServletRequest request,
HttpServletResponse response,
ServletContext application)
Logs a user in with a user name and a password. |
java.lang.String |
getAuthType()
Returns the authentication type. |
protected java.security.Principal |
getBasicPrincipal(HttpServletRequest request,
HttpServletResponse response,
ServletContext application)
Returns the principal from a basic authentication |
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 void |
sendBasicChallenge(HttpServletResponse res)
Sends a challenge for basic authentication. |
void |
setRealmName(java.lang.String realm)
Sets the login realm. |
| 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 BasicLogin()
| 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 sendBasicChallenge(HttpServletResponse res)
throws ServletException,
java.io.IOException
ServletException
java.io.IOException
protected java.security.Principal getBasicPrincipal(HttpServletRequest request,
HttpServletResponse response,
ServletContext application)
throws ServletException
auth - the authenticator for this application.
ServletException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||