@Service public class FormLogin extends AbstractLogin
| Modifier and Type | Field and Description |
|---|---|
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 |
_auth, _singleSignonLOGIN_PASSWORD, LOGIN_USER, LOGIN_USER_NAME| Constructor and Description |
|---|
FormLogin() |
| Modifier and Type | Method and Description |
|---|---|
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) |
findSavedUser, getAuthenticator, getLoginPrincipalImpl, getSingleSignon, getUserPrincipal, isLogoutOnSessionTimeout, isPasswordBased, isSessionSaveLogin, isUserInRole, login, login, logout, logoutImpl, saveUser, sessionInvalidate, setAuthenticator, setLogoutOnSessionTimeout, setSessionSaveLogin, toStringpublic 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
public void setFormLoginPage(java.lang.String formLoginPage)
throws ConfigException
ConfigExceptionpublic void setLoginPage(java.lang.String loginPage)
public java.lang.String getFormLoginPage()
public void setFormErrorPage(java.lang.String formErrorPage)
throws ConfigException
ConfigExceptionpublic 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 AbstractLoginServletExceptionpublic java.lang.String getAuthType()
getAuthType in interface LogingetAuthType in class AbstractLoginpublic boolean isLoginUsedForRequest(HttpServletRequest request)
isLoginUsedForRequest in interface LoginisLoginUsedForRequest in class AbstractLoginpublic java.security.Principal getUserPrincipalImpl(HttpServletRequest request)
getUserPrincipalImpl in class AbstractLoginrequest - servlet requestprotected boolean isSavedUserValid(HttpServletRequest request, java.security.Principal savedUser)
isSavedUserValid in class AbstractLoginpublic void loginSuccessResponse(java.security.Principal user,
HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
java.io.IOException
loginSuccessResponse in class AbstractLoginrequest - servlet requestresponse - servlet response, in case any cookie need sending.ServletExceptionjava.io.IOExceptionpublic void loginChallenge(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
loginChallenge in class AbstractLoginrequest - servlet requestresponse - servlet response, in case any cookie need sending.application - servlet applicationServletExceptionjava.io.IOException