EMQX e bula mofuta oa netefatso ea tumello ea khokahano ea HTTP
Tšupiso
Webosaete ea semmuso Phallo ea netefatso ea HTTP Protocol ea HTTPLokisa plugin ea netefatso ea HTTP
Sebelisa vi kapa vim ho hlophisa file ea /etc/emqx/plugins/emqx_auth_http.conf. Beakanya netefatso ea khokahano, netefatso ea motsamaisi, 'me u phatlalatse le ho ngolisa netefatso ka tatellano. Tlhophiso e arotsoe ka lintho tse 'ne, aterese ea sehokelo sa HTTP, mokhoa oa kopo, mofuta oa litaba le mekhahlelo ea likopo. Aterese ea sebopeho e bua ka aterese ea HTTP. Hangata re sebelisa GET kapa POST bakeng sa mokhoa oa kopo, mme POST ea khothaletsoa. Mofuta oa litaba hangata o sebelisa x-www-form-urlencoded. Paramente ea kopo ke ea bohlokoa ka ho fetisisa. Mona re hloka ho kenyelletsa likahare tsohle tseo re li hlokang ho ahlola tumello. Mohlala oa rona o ka tlase, aterese ea ts'ebeletso ea API ea rona ke kenyelletso e kopaneng. Sebopeho sa 'nete sa mohala se boletsoe ke ketso e maemong. Ha e le hantle, re ka e khetholla ho url,' me u ka e fetola ho latela ts'ebeliso ea hau. Khoutu ea seva e ke ke ea hlalosoa sengoloeng sena, hobane e hokahane haholo le mohopolo oa khoebo. Seo re tlamehang ho se etsa ke ho khutlisetsa sephetho ho EMQX kamora kahlolo e utloahalang. Haeba re batla ho fetisa netefatso, re tla khutlisa khoutu ea boemo ba HTTP 200 ka mokhoa o tloaelehileng, haeba e hloleha E khutlisa khoutu ea boemo ba HTTP 403.
auth.http.auth_req = http://127.0.0.1:80/
auth.http.auth_req.method = post
auth.http.auth_req.content_type = x-www-form-urlencoded
auth.http.auth_req.params = client_id=%c,username=%u,password=%P,action=emqx_auth:auth_req
auth.http.super_req = http://127.0.0.1:80/
auth.http.super_req.method = post
auth.http.super_req.content_type = x-www-form-urlencoded
auth.http.super_req.params = client_id=%c,username=%u,action=emqx_auth:super_req
auth.http.acl_req = http://127.0.0.1:80/
auth.http.acl_req.method = post
auth.http.acl_req.content_type = x-www-form-urlencoded
auth.http.acl_req.params = access=%A,username=%u,client_id=%c,ip=%a,topic=%t,action=emqx_auth:acl_req
Jarolla plugin ea netefatso ea HTTP
emqx_ctl plugins load emqx_auth_http
Liphetho tsa netefatso
Kamora ts'ebetso e boletsoeng kaholimo, re hloka ho sebelisa moreki oa MQTT ho hokela.Re leka ho sebelisa moreki ea tloaelehileng le moreki oa taolo ho hokela ho seva ho bona hore na sephetho se lebelletsoe na. Ebe u phatlalatsa le ho ngolisa lihlooho ho bona hore na taolo ea bolaoli e fihlela litlhoko tsa rona. Haeba khethollo e fumanoa, re ka rarolla khoutu ea seva ho fihlela tsohle li tloaelehile.