|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.security.AbstractLogin
com.caucho.security.FormLogin
@Service public class FormLogin
Used to authenticate users in a servlet request. Applications will implement the Authenticator interface with a bean for authentication.
Field Summary | |
---|---|
protected java.lang.String |
_errorPage
|
protected boolean |
_formURIPriority
|
protected boolean |
_internalForward
|
protected java.lang.String |
_loginPage
|
static java.lang.String |
LOGIN_CHECK
|
static java.lang.String |
LOGIN_SAVED_PATH
|
static java.lang.String |
LOGIN_SAVED_QUERY
|
Fields inherited from class com.caucho.security.AbstractLogin |
---|
_auth, _singleSignon |
Fields inherited from interface com.caucho.security.Login |
---|
LOGIN_PASSWORD, LOGIN_USER, LOGIN_USER_NAME |
Constructor Summary | |
---|---|
FormLogin()
|
Method Summary | |
---|---|
java.lang.String |
getAuthType()
Returns the authentication type. |
java.lang.String |
getFormErrorPage()
Gets the error page. |
java.lang.String |
getFormLoginPage()
Gets the login page. |
boolean |
getFormURIPriority()
Returns true if the form's j_uri has priority over the saved URL. |
boolean |
getInternalForward()
Returns true if a successful login allows an internal forward instead of a redirect. |
java.security.Principal |
getUserPrincipalImpl(HttpServletRequest request)
Logs a user in with a user name and a password. |
void |
init()
Initialize |
boolean |
isLoginUsedForRequest(HttpServletRequest request)
Returns true if the request has a matching login. |
protected boolean |
isSavedUserValid(HttpServletRequest request,
java.security.Principal savedUser)
Returns true if a new login overrides the saved user |
void |
loginChallenge(HttpServletRequest request,
HttpServletResponse response)
Logs a user in with a user name and a password. |
void |
loginSuccessResponse(java.security.Principal user,
HttpServletRequest request,
HttpServletResponse response)
Updates after a successful login |
void |
setErrorPage(java.lang.String errorPage)
|
void |
setFormErrorPage(java.lang.String formErrorPage)
Sets the error page. |
void |
setFormLoginPage(java.lang.String formLoginPage)
Sets the login page. |
void |
setFormURIPriority(boolean formPriority)
True if the form's j_uri has priority over the saved URL. |
void |
setInternalForward(boolean internalForward)
Set true if a successful login allows an internal forward instead of a redirect. |
void |
setLoginPage(java.lang.String loginPage)
|
Methods inherited from class com.caucho.security.AbstractLogin |
---|
findSavedUser, getAuthenticator, getLoginPrincipalImpl, getSingleSignon, getUserPrincipal, isLogoutOnSessionTimeout, isPasswordBased, isSessionSaveLogin, isUserInRole, login, login, logout, logoutImpl, saveUser, sessionInvalidate, setAuthenticator, setLogoutOnSessionTimeout, setSessionSaveLogin, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LOGIN_CHECK
public static final java.lang.String LOGIN_SAVED_PATH
public static final java.lang.String LOGIN_SAVED_QUERY
protected java.lang.String _loginPage
protected java.lang.String _errorPage
protected boolean _internalForward
protected boolean _formURIPriority
Constructor Detail |
---|
public FormLogin()
Method Detail |
---|
public void setFormLoginPage(java.lang.String formLoginPage) throws ConfigException
ConfigException
public void setLoginPage(java.lang.String loginPage)
public java.lang.String getFormLoginPage()
public void setFormErrorPage(java.lang.String formErrorPage) throws ConfigException
ConfigException
public void setErrorPage(java.lang.String errorPage)
public java.lang.String getFormErrorPage()
public boolean getInternalForward()
public void setInternalForward(boolean internalForward)
public boolean getFormURIPriority()
public void setFormURIPriority(boolean formPriority)
@PostConstruct public void init() throws ServletException
init
in class AbstractLogin
ServletException
public java.lang.String getAuthType()
getAuthType
in interface Login
getAuthType
in class AbstractLogin
public boolean isLoginUsedForRequest(HttpServletRequest request)
isLoginUsedForRequest
in interface Login
isLoginUsedForRequest
in class AbstractLogin
public java.security.Principal getUserPrincipalImpl(HttpServletRequest request)
getUserPrincipalImpl
in class AbstractLogin
request
- servlet request
protected boolean isSavedUserValid(HttpServletRequest request, java.security.Principal savedUser)
isSavedUserValid
in class AbstractLogin
public void loginSuccessResponse(java.security.Principal user, HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
loginSuccessResponse
in class AbstractLogin
request
- servlet requestresponse
- servlet response, in case any cookie need sending.
ServletException
java.io.IOException
public void loginChallenge(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
loginChallenge
in class AbstractLogin
request
- servlet requestresponse
- servlet response, in case any cookie need sending.application
- servlet application
ServletException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |