HTTP Basic Authentication

HTTP Basic Authentication A sequence diagram generated by Archify. mở /admin GET /admin (không header) 401 + WWW-Authenticate: Basic realm="Admin", charset="UTF-8" hiện hộp thoại đăng nhập nhập toby / secret Authorization: Basic dG9i… Base64 của "toby:secret" decode, so khớp hash khớp 200 OK hiện trang admin tự gửi lại Authorization mọi request cùng realm kiểm tra lại từ đầu 200 OK 1. Chưa có tài khoản 2. Gửi tài khoản 3. Request tiếp theo Người dùng · nhập tài khoản · Sequence participant Người dùng nhập tài khoản Trình duyệt · Chrome, curl… · Sequence participant Trình duyệt Chrome, curl… Server · nginx / Laravel · Sequence participant Server nginx / Laravel Kho tài khoản · htpasswd / users · Sequence participant Kho tài khoản htpasswd / users Legend main request return security async trace message