wifidog的認證流程圖:
1· 使用者串連WIFI會跳轉到以下地址:
http://auth_server/login?gw_id=[GatewayID, default: "default"]gw_address=[GatewayAddress, internal IP of router]gw_port=[GatewayPort, port that wifidog Gateway is listening on]url=[user requested url]auth_server #即認證的網域名稱gw_id #配置的網關名稱gw_address #回調的內網地址gw_port #回調的連接埠在這個階段需要返回登入的頁面,即授權的首頁,並且需要將所有涉及跳轉的第三方地址加入白名單。
2· 當驗證使用者身份之後,即使用者登入成功之後重新導向到網關地址
http://GatewayIP:GatewayPort/wifidog/auth?token=[auth token]auth token #系統為使用者產生的token
3· 網關地址接受到訊息後,會周期的發送使用者資訊,並確認是不是允許繼續網路訪問 請求地址
http://auth_server/auth/index.php?stage=countersip=mac=token=incoming=outgoing=ip,mac,token為使用者的基本資料,incoming/outgoing為使用者的串連計數資訊,用來限定使用者是否可以繼續串連此時auth_server需要返回該請求:0——拒絕,刪除防火牆內使用者以及使用者的資訊6——使用者驗證失敗,逾時,會刪除防火牆內資訊(即會重新要求登入)1——使用者驗證通過,並跳轉到http://auth_server/portal/?gw_id=%s5——使用者需要驗證,允許規則內的訪問進行驗證-1——使用者驗證出錯,使用者可以繼續訪問網路返回資料格式:Auth: <number from user status list>如Auth: 1 #中間有個空格
4· 系統會周期性發送心跳包,用來確認網關驗證和證明伺服器的正常工作請求地址
http://auth_sever/ping/?gw_id=%ssys_uptime=%lusys_memfree=%usys_load=%.2fwifidog_uptime=%luauth_server此時需要返回“Pong”可以通過該心跳包來監控整個認證的工作