Source code template for External Web Portal (Standalone Mode)

EAP225-Wall , EAP115 , EAP225 , EAP225-Outdoor , EAP245 , EAP110-Outdoor , Omada Software Controller , EAP110 , EAP220 , EAP120 , EAP115-Wall , EAP235-Wall
Recent updates may have expanded access to feature(s) discussed in this FAQ. Visit your product's support page, select the correct hardware version for your device, and check either the Datasheet or the firmware section for the latest improvements added to your product. Please note that product availability varies by region, and certain models may not be available in your region.
This document outlines the requirements when establishing an external web portal server. In standalone mode, External Web Portal can only be used when the portal authentication type is External Radius Server. If you are using External Web Portal function in Omada Controller mode, you can refer to FAQ916
The below picture depicts the workflow among the wireless client, Omada EAP, External Web Portal and the Radius Server. It will help you get a better understanding of the requirements for establishing an External Web Portal server.
- Wireless client is connected to the SSID of the wireless network and try to access the internet. EAP device redirects the client’s request to the external web portal by replying a HTTP response with status code 200 Found to the client. (Step 1 and Step 2)
- Client sends HTTP GET request to external web portal with parameter “target=target_ap_ip&clientMac=client_mac”. For example, 192.168.10.104/?target=192.168.10.102&clientMac=38:71:de:31:7d:67 (Step 3)
- External web portal server should be able to get the value of the target, clientMac parameters. Then external web portal server should return a page with a form. This form will collect the information of username, password, clientMac.
For example:
<form id="form" method="post">
<div><span>username:</span><input type="text" name="username"/> </div>
<div><span>password:</span><input type="password" name="password"/> </div>
<div style="display:none"><span>clientMac:</span><input type="text" id="cid" name="clientMac" /></div>
Please note that the “id” of these elements in your form should be the same as this example. The method to get the value of “username” and “password” can be defined by yourself, but the value of “cid” must be obtained from the Http Request’s URL.
(Step 4)
- The form should be POST to http://target_ap_ip/portal/auth after submit. (Step5)
- EAP communicates with radius server to verify the username and password. (Step 6 and Step 7)
- If the authentication is passed, i.e., Access-Accept is received from radius server, EAP will return a built-in success page or a predefined webpage according to the configuration. (Step 8)
The below html template is a simple demo for you to develop your External Web Portal working with EAP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<form id="form" method="post">
<div><span>username:</span><input type="text" name="username"/> </div>
<div><span>password:</span><input type="password" name="password"/></div>
<div style="display:none"><span>clientMac:</span><input type="text" id="cid" name="clientMac" /></div>
<button type="submit">submit</button>
</form>
<script type="text/javascript">
var submitUrl = "http://" + getQueryString("target") + "/portal/auth";
document.getElementById("form").action = submitUrl;
document.getElementById("cid").value = getQueryString("clientMac");
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]); return null;
}
</script>
Note: When you use External Radius Server in standalone mode, please add the external web portal to Free Authentication Policy.
Câu hỏi thường gặp này có hữu ích không?
Phản hồi của bạn giúp cải thiện trang web này.
Mối quan tâm của bạn với bài viết này là gì?
- Không hài lòng với sản phẩm
- Quá phức tạp
- Tiêu đề khó hiểu
- Không áp dụng cho tôi
- Quá mơ hồ
- Khác
Cảm ơn
Chúng tôi đánh giá cao phản hồi của bạn.
Nhấp vàođây để liên hệ với bộ phận hỗ trợ kỹ thuật của TP-Link.
This website uses cookies to improve website navigation, analyze online activities and have the best possible user experience on our website. You can object to the use of cookies at any time. You can find more information in our privacy policy . Don’t show again
This website uses cookies to improve website navigation, analyze online activities and have the best possible user experience on our website. You can object to the use of cookies at any time. You can find more information in our privacy policy . Don’t show again
Basic Cookies
Những cookie này cần thiết để trang web hoạt động và không thể tắt trong hệ thống của bạn.
TP-Link
SESSION, JSESSIONID, accepted_local_switcher, tp_privacy_base, tp_privacy_marketing, tp_smb-select-product_scence, tp_smb-select-product_scenceSimple, tp_smb-select-product_userChoice, tp_smb-select-product_userChoiceSimple, tp_smb-select-product_userInfo, tp_smb-select-product_userInfoSimple, tp_top-banner, tp_popup-bottom, tp_popup-center, tp_popup-right-middle, tp_popup-right-bottom, tp_productCategoryType
Youtube
id, VISITOR_INFO1_LIVE, LOGIN_INFO, SIDCC, SAPISID, APISID, SSID, SID, YSC, __Secure-1PSID, __Secure-1PAPISID, __Secure-1PSIDCC, __Secure-3PSID, __Secure-3PAPISID, __Secure-3PSIDCC, 1P_JAR, AEC, NID, OTZ
Zendesk
OptanonConsent, __cf_bm, __cfruid, _cfuvid, _help_center_session, _pendo___sg__.<container-id>, _pendo_meta.<container-id>, _pendo_visitorId.<container-id>, _zendesk_authenticated, _zendesk_cookie, _zendesk_session, _zendesk_shared_session, ajs_anonymous_id, cf_clearance
Analysis and Marketing Cookies
Cookie phân tích cho phép chúng tôi phân tích các hoạt động của bạn trên trang web của chúng tôi nhằm cải thiện và điều chỉnh chức năng trang web của chúng tôi.
Các cookie tiếp thị có thể được các đối tác quảng cáo của chúng tôi thiết lập thông qua trang web của chúng tôi để tạo hồ sơ về sở thích của bạn và hiển thị cho bạn các quảng cáo có liên quan trên các trang web khác.
Google Analytics & Google Tag Manager
_gid, _ga_<container-id>, _ga, _gat_gtag_<container-id>
Google Ads & DoubleClick
test_cookie, _gcl_au