public class CmsLoginController extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CmsLoginController.CmsLoginTargetInfo
Represents the login target information.
|
protected static class |
CmsLoginController.UserAgreementHelper
Helper subclass of CmsLoginUserAgreement which can be used without a page context.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
KEY_ACCOUNT_LOCKED
Additional info key to mark accounts as locked due to inactivity.
|
| Constructor and Description |
|---|
CmsLoginController(CmsObject adminCms,
CmsLoginHelper.LoginParameters params)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getFormLink(CmsObject cms)
Returns the link to the login form.
|
static java.lang.String |
getLoginTarget(CmsObject currentCms,
CmsWorkplaceSettings settings,
java.lang.String requestedResource)
Gets the login target link.
|
protected java.lang.String |
getPasswordChangeMessage()
Returns the message to be displayed for the user data check dialog.
|
java.lang.String |
getPcType()
Gets the PC type.
|
java.lang.String |
getResetPasswordLink()
Returns the reset password link.
|
boolean |
isShowSecure()
Returns true if the security option should be displayed in the login dialog.
|
static void |
logout()
Logs the current user out by invalidating the session an reloading the current URI.
|
static void |
logout(CmsObject cms,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Logs out the current user redirecting to the login form afterwards.
|
void |
onClickForgotPassword()
Called when the user clicks on the 'forgot password' button.
|
void |
onClickLogin()
Called when the user clicks on the login button.
|
void |
onInit()
Called on initialization.
|
void |
setUi(CmsLoginUI ui)
Sets the login ui reference.
|
public static final java.lang.String KEY_ACCOUNT_LOCKED
public CmsLoginController(CmsObject adminCms, CmsLoginHelper.LoginParameters params)
adminCms - the admin cms contextparams - the parameters for the UIpublic static java.lang.String getFormLink(CmsObject cms)
cms - the current cms contextpublic static java.lang.String getLoginTarget(CmsObject currentCms, CmsWorkplaceSettings settings, java.lang.String requestedResource) throws CmsException
currentCms - the current CMS contextsettings - the workplace settingsrequestedResource - the requested resource parameterCmsException - in case the user has insufficient permissions to access the login targetpublic static void logout()
Important: This works only within vaadin apps.
public static void logout(CmsObject cms, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
cms - the cms contextrequest - the servlet requestresponse - the servlet responsejava.io.IOException - if writing to the response failspublic java.lang.String getPcType()
public java.lang.String getResetPasswordLink()
public boolean isShowSecure()
public void onClickForgotPassword()
public void onClickLogin()
public void onInit()
public void setUi(CmsLoginUI ui)
ui - the login uiprotected java.lang.String getPasswordChangeMessage()