You want to integrate your Android app with Facebook Android SDK, Google Play Services or Firebase. With Facebook, you need to config key hash. You can use Facebook manual to get your own key hash or read my blog.
How to download Android Keytool?
Go to Android Keytool’s GitHub repo. Select release tab and download latest .jar file. After download tool, you can open and start using tool. See video demo here. So easy!
Có thể do các API tạo bằng JHipster để dùng trên môi trường web, nên sinh ra cookie là XSRF-TOKEN. Mỗi khi gửi request lên API thì Header có kèm thêm field X-XSRF-TOKEN, value của field này được lấy từ cookie XSRF-TOKEN. JHipster đã làm sẵn cho ta các bước này. Ngoài ra, API còn sử dụng thêm session JSESSIONID để verify request. Nhưng khi gọi API trên Android/iOS, ta phải tự làm các bước giống như trên. Gọi 1 API bất kỳ để sinh ra cookie XSRF-TOKEN. Ta cần lấy tất cả cookie từ response header, lưu lại để dùng cho các request sau. Khi tạo request mới, thì gán các cookie đã lưu vào request header. Ngoài ra, ta cần tìm cookie XSRF-TOKEN, lấy value gán cho field X-XSRF-TOKEN ở request header. Khi có response ở bước 2, ta lặp lại bước 1. Khi lưu và lấy cookie cần lưu theo domain để tránh trùng cookie do API sinh ra với cookie do website khác sinh ra. Ví dụ thực tế trên iOS: JHipster sinh ra session JSESSIONID, ta lưu cookie vào NSHTTPCookieStorage và không theo domain. (1) Mở 1 ...
Nếu bạn đang configure port cho SSH, sau đó restart lại sshd mà gặp báo lỗi kiểu như thế này Job for ssh.service failed because the control process exited with error code. See "systemctl status ssh.service" and "journalctl -xe" for details. Thì hãy chạy lệnh journalctl -xe để xem báo lỗi cụ thể là gì nhé. Giả sử ta đang configure port number là 9999, lúc này báo lỗi sẽ có dạng Dec 04 22:25:16 localhost sshd[25003]: error: Bind to port 9999 on 0.0.0.0 failed: Permission denied. Dec 04 22:25:16 localhost sshd[25003]: error: Bind to port 9999 on :: failed: Permission denied. Dec 04 22:25:16 localhost sshd[25003]: fatal: Cannot bind any address. Dec 04 22:25:16 localhost systemd[1]: sshd.service: main process exited, code=exited, status=255/n/a Dec 04 22:25:16 localhost systemd[1]: Failed to start OpenSSH server daemon. -- Subject: Unit sshd.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -...
Hừm, hôm nay là ngày đặc biệt đây. Ai được sinh vào ngày này thì cứ xác định 4 năm mới sinh nhật nhé 😂. Hôm nay cũng là ngày cuối tháng 2, tháng ẩm ương. Sương, nồm ẩm ướt đẫm tâm hồn khô khan. Lan man ngồi ngẫm cả ngàn ý thơ. Giỏi việc nước đảm việc nhà. Nộp lương đầy đủ mua quà thường xuyên. Sai quá sai, ahaha! 8 ngày nữa là ngày 8/3, cho chị em lên ngôi tí.
Nhận xét
Đăng nhận xét