LogoLogo
  • EnGenius Cloud Technology
  • EnGenius Cloud Services DataCenters
  • LLDP-MED
  • Presence Service
  • Captive Portal
    • Integrate with External Splash Page
      • Click-through
      • Sign-on Splash
      • Error Message
  • Zero-wait DFS
  • Security Access Points
    • Wireless Network Security Issues
    • Denial of Service and EnGenius Solution
    • Data Breach, Passcode Cracking, and the EnGenius Solution
    • EnGenius Solution and Benefits
  • AirGuard
    • Rogue AP
    • Rules and Classifications
    • Evil Twin
    • Malicious Attacks
    • RF Jamming
  • Fast Handover RSSI Thresholds
  • Authentication with Google Secure LDAP Server
    • Configure Google LDAP Authentication for Wireless Networks Access
    • Appendix
    • Troubleshooting
  • Authentication with Microsoft Active Directory (AD) Server for Wireless Users
    • Configure Active Directory Authentication for Wireless Network Access (SSID)
    • Behavior to Authenticate Users with Microsoft AD Server
    • Appendix
    • Troubleshooting
  • Configure SAML SSO with ADFS
  • Authentication with Microsoft Entra ID LDAP Server
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Captive Portal
  2. Integrate with External Splash Page

Error Message

When a failed login occurs from Captive Portal, the user will be redirected to the splash page again with 2 additional query parameters res and reason to indicate the error. The https request to the splash page could be like this:

https://yourwebsite.com/splash.html?actionurl=......&res=failed&reason=xxxx

These 2 parameters can be used for displaying error message on splash page. The usage is depicted in the following table:

Parameters
Description

res=failed&reason=reject

Invalid username or password.

res=failed&reason=timeout

No response from authentication server.

res=failed&reason=mtu

Abnormal network error.

res=failed&reason=other

Other errors.

Reference Code

The following JavaScript code illustrates how to display error message in splash page.

   <script>
      function check_error(){
        const params = new Proxy(new URLSearchParams(window.location.search), {
          get: (searchParams, prop) => searchParams.get(prop),
        });
        if (params.res === "failed") {
          switch(params.reason) {
            case "reject":
              alert("Invalid Username or Password.");
              break;
            case "timeout":
              alert("No response from authentication server.");
              break;
            case "mtu":
              alert("Abnormal network error.");
              break;
            case "other":
              alert("Other errors.");
              break;
            default:
              alert("Other errors. (no reason)");
          }
        }
      }
    </script>    
  </head>

  <body onload="check_error()" style="">

Last updated 2 years ago

Was this helpful?