Authentication
Authentication ถือว่าเป็นส่วนหนึ่งของ MQTT Security ทั้งใน Transport level และ Application level ค่ะ ใน TLS (Transport Layer Security) ใช้ client certificate ในการยืนตัวตนของ client ต่อ server ส่วนใน Application level นั้น MQTT protocol จะมี built-in authentication ซึ่ง ใช้ username/password ในการยืนยันตัวตน
ซึ่ง username/password จะอยู่ใน CONNECT message เป็น optional ค่ะ ไม่ใส่ก็ได้ (สามารถใส่แต่ username โดยไม่มี password ยังได้ค่ะ แต่ไม่สามารถใส่ password โดยไม่มี username นะคะ)

username/password ใน CONNECT message จะถูกตรวจสอบโดย broker และ ส่ง return code กลับไปให้กับ client ตามนี้ค่ะ
กรุณาเข้าสู่ระบบเพื่ออ่านบทความเต็ม
Login with Facebook27/09/2019