Example usage for com.liferay.portal.kernel.util WebKeys HTTPS_INITIAL

List of usage examples for com.liferay.portal.kernel.util WebKeys HTTPS_INITIAL

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util WebKeys HTTPS_INITIAL.

Prototype

String HTTPS_INITIAL

To view the source code for com.liferay.portal.kernel.util WebKeys HTTPS_INITIAL.

Click Source Link

Usage

From source file:com.liferay.login.web.internal.portlet.action.LoginMVCActionCommand.java

License:Open Source License

protected String getCompleteRedirectURL(HttpServletRequest request, String redirect) {

    HttpSession session = request.getSession();

    Boolean httpsInitial = (Boolean) session.getAttribute(WebKeys.HTTPS_INITIAL);

    String portalURL = null;/*from w w w.j a v a  2s . c om*/

    if (PropsValues.COMPANY_SECURITY_AUTH_REQUIRES_HTTPS && !PropsValues.SESSION_ENABLE_PHISHING_PROTECTION
            && (httpsInitial != null) && !httpsInitial.booleanValue()) {

        portalURL = _portal.getPortalURL(request, false);
    } else {
        portalURL = _portal.getPortalURL(request);
    }

    return portalURL.concat(redirect);
}