WifiDog 認(rèn)證原理和流程

WifiDOG是一個熱點(diǎn)系統(tǒng),包含了認(rèn)證服務(wù)器和客戶端兩部分組成,認(rèn)證原理大體說下:

General Flow Description:

一般流程描述:

①The client does his initial request, as if he was already connected, (e.g.:http://www.6hl.cn)

客戶端發(fā)出初始化請求,比如訪問 www.6hl.cn 這個站點(diǎn)

②The Gateway's firewall rules mangle the request to redirect it to a local port on the Gateway. When that's the done, the Gateway provides an HTTP Redirect reply that contains the Gateway ID, Gateway FQDN and other informations

網(wǎng)關(guān)的防火墻規(guī)則將這個請求重定向到本地網(wǎng)關(guān)的端口上。當(dāng)做完這個工作,網(wǎng)關(guān)提供一個HTTP重定向回復(fù),包含了Gateway的ID,Gateway的FQDN以及其他的信息。

③The Client does his request to the Auth Server as specified by the Gateway, see Login Protocol

用戶向認(rèn)證服務(wù)器發(fā)出認(rèn)證請求

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]

④The Gateway replies with a (potentially custom) splash (login) page

網(wǎng)關(guān)返回一個(可以是自定義的)splash(也稱作“登錄”)頁面

⑤The Client provides his identification informations (username and password)

用戶提供他的憑據(jù)信息,比如用戶名和密碼

⑥Upon succesful authentication, the client gets an HTTP Redirect to the Gateway's own web server with his authentication proof (a one-time token),http://GatewayIP:GatewayPort/wifidog/auth?token=[authtoken]

成功認(rèn)證的話,客戶端將會被重定向到網(wǎng)關(guān)的自己的web頁面上,并且?guī)в幸粋€ 認(rèn)證憑據(jù)(一個一次性的token),內(nèi)容比如

http://GatewayIP:GatewayPort/wifidog/auth?token=[authtoken]

⑦The Client then connects to the Gateway and thus gives it his token

用戶就是用獲取到的憑據(jù)訪問網(wǎng)關(guān)

⑧The Gateway requests validation of the token from the Auth Server, see Client Protocol【見登錄心跳】

網(wǎng)關(guān)去認(rèn)證服務(wù)器詢問token的有效性

⑨The Auth Server confirms the token

認(rèn)證服務(wù)器確認(rèn)token的有效性

①①The Gateway then sends a redirect to the Client to obtain the Success Page from the Auth Server, redirects tohttp://auth_server/portal/

網(wǎng)關(guān)發(fā)送重定向給客戶端,以從認(rèn)證服務(wù)器上獲取 成功提示頁面,重定向到http://auth_server/portal/這個位置

①②The Auth Server notifies the Client that his request was successful

認(rèn)證服務(wù)器通知客戶請求成功,可以上網(wǎng)了。

本文由http://www.wifidog.pro/2015/02/11/wifidog%E5%8E%9F%E7%90%86%E5%8F%8A%E6%B5%81%E7%A8%8B.html整理編輯,轉(zhuǎn)載請注明出處

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 上一篇分析了 接入設(shè)備 在接入路由器,并發(fā)起首次 HTTP/80 請求到路由器上時,wifidog 是如何將此 H...
    3c937c88e6c0閱讀 1,627評論 0 2
  • Spring Cloud為開發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務(wù)發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 136,635評論 19 139
  • =========================================================...
    lavor閱讀 3,649評論 0 5
  • 這篇文章介紹了Mobile BI(移動商務(wù)智能)使用過程中涉及的各種身份認(rèn)證的方式,主要目的是對這些方式的原理進(jìn)行...
    雨_樹閱讀 2,313評論 1 2
  • 這是我長大后第一次這么仔細(xì)地看他的臉,心里感到頗為驚訝。凌亂泛黃的頭發(fā),圓厚黝黑的臉上,毛孔粗大,嘴唇上已經(jīng)不能分...
    平行空間的思維閱讀 291評論 0 0

友情鏈接更多精彩內(nèi)容