public boolean isSecure() {
        if (secure == null) {
            Object request = context.getExternalContext().getRequest();

            if (request instanceof HttpServletRequest) {
                secure = ((HttpServletRequest) request).isSecure();
            }
            else {
                try {
                    Method method = request.getClass().getDeclaredMethod("isSecure", EMPTY_PARAMS);
                    secure = (Boolean) method.invoke(request, (Object[]) null);
                }
                catch (Exception e) {
                    secure = false;
                }
            }
        }

        return secure;
    }
Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS.

@return if secure or not.
primefaces/src/main/java/org/primefaces/context/PrimeRequestContext.java