+++ access token คืออะไรใน facebook ++++
😋 ปกติ facebook เปิดให้เว็บ (รวมทั้งแอพ) ที่เราเขียนขึ้น
สามารถใช้ระบบ login ของ facebook ได้
ทำให้เว็บนั้นได้สิทธิเข้าถึงข้อมูลส่วนตัวของ user นั้นๆ บน facebook
.
และในหลายเว็บไซต์ เราคงเคยเห็น
ขอแค่มีแอคเคาท์เฟสบุ๊คก็สามารถล็อกอินได้เลย
ไม่ต้องเสียเวลายุ่งยาก กรอกสมัครสมาชิกใหม่แต่อย่างใด
:
โดยในโพสต์นี้จะขออ้างอิง
การใช้ระบบล็อกอิน facebook
ซึ่งเบื้องหลังความสำเร็จนั้น facebook จะแจก access token
เพื่อให้เว็บใดๆ สามารถนำไปใช้จัดการยูสเซอร์ล็อกอินได้
:
ก่อนจะพูดถึง access token ขอย้อนไปสมัยวัยกระเตาะปี 2534
เมื่อ "ทิม เบอร์เนิร์ส-ลี" ได้ทำคลอดเว็บไซต์แรกของโลก
จนเป็นสิ่งสามัญประจำบ้านที่มนุษย์โลกใช้เป็น
:
❣ แต่จุดอ่อนของฉัน ....อยู่ที่หัวใจ
เฮยไม่ช่ายแหละ จุดอ่อนของเว็บไซต์
ก็คือมันใช้โปโตคอล HTTP
ซึ่งมันเป็นแบบ stateless ไม่จำสถานะอะไรทั้งนั้น
ความหมายก็คือ ตัว Server ความจำสั้นมาก เป็นโรคอัลไซเมอร์
พอมันรับ request จาก browser
ก็จำไม่ได้ว่ามาจากไหน???
ใครส่งมาจำไม่ได้แล้ว!!!!!
:
🤔 เพื่อแก้ปัญานี้ในทางเทคนิค
เขาจะให้ server ส่ง session id (หรือ session token)
ซึ่ง session id มันเป็นรหัสบางอย่าง ที่เราอ่านไม่ออก แถมยาวด้วย
มันจะถูกส่งไปให้ browser เก็บค่านี้ไว้ในคุ๊กกี้เสี่ยงทาย
.
..ผิดๆ ไม่ใช่คุ๊กกี้นั้น ..แต่ cookies ที่ว่าคือไฟล์ text
Server จะส่ง session id ไปให้ browser
เก็บค่าไว้ใน cookies (เก็บใส่ text อยู่ฝั่ง browser)
:
เวลาเขียนโปรแกรมในฝั่ง server
อย่าง PHP เมื่อใช้คำสั่ง session_start();
จะเป็นการบอกให้ browser เก็บค่า session id ในรูป text เช่น
PHPSESSID=tqb4s5q7k25234eabbvs11dp02
(session id เป็นรหัสที่สุ่มขึ้นมา)
:
แต่ถ้าเป็นภาษาอื่น ก็อาจเห็นเป็นคำอื่นนะครับ
เช่น JSESSIONID (Java EE), PHPSESSID (PHP), และ ASPSESSIONID (Microsoft ASP).
.
😉 ถึงตรงนี้ session id ...อาจมองว่าเป็นรหัสประจำตัวก็ได้
:
ต่อไปนี้เวลาผู้ใช้กดคลิกอะไรบนหน้าเว็บ
ทาง browser ก็จะใจดี
แอบส่ง session id ที่ว่านี้ ไปให้ server อัตโนมัติ
ทำให้ server หายจากอัลไซเมอร์
...จำได้แล้วว่า request ส่งมาจากไหน ...เย้ เย้
.
ดังนั้นถ้าเกิด request ที่ส่งเข้ามา
มันมี session id ค่าเดียวกัน
ก็ถือว่าเป็นพรรคพวกเดียวกัน
(ศัพท์ทางคอมจะบอกว่า request พวกนี้อยู่ SESSION เดียวกัน)
.
แล้วถ้าไม่ใช่ session id เดียวกัน
ก็ถือว่า request นั้น ไม่ใช่พวกพ้องเดียวกัน
:
👉 ประโยชน์ของ session id
จะถูกนำไปใช้ร่วมกับกลไก login/logout
1) เมื่อ user ชื่อ XXX ทำการ login เข้ามา ก็จะมี session id เป็นรหัสประจำตัวอันหนึ่ง
2) พออีก user ชื่อ YYY ทำการ login เข้ามา จะมี session id เป็นรหัสประจำตัวคนละตัว
3) พอทั้งสอง user ทำการ logout ก็จะทำให้ session id หมดอายุ
:
คำถาม ถ้าเราไปกดล้าง cookies ทั้งหมดใน browser จะเกิดอะไรขึ้น?
- คำตอบค่า session id จะหายไปหมด
- ดังนั้นใครแอบ login ค้างเว็บโป้ เว็บโน่นนี้นั่น อะไรไว้ ...หึหึๆๆ
- ก็ต้อง logout อัตโนมัติ เพื่อ login ใหม่ ...เศร้ามั๊ยละ
(server จำเราไม่ได้แล้ว
เพราะ browser ไม่ส่ง session id ไปให้)
:
เรื่อง session id ฟังเหมือนดี
😨 แต่การใช้ร่วมกับ user/password เพื่อ login จะมีข้อเสีย เช่น
1) ง่ายต่อ hacker มาแอบลอบขี่ session
เพื่อสวมรอยใช้ sesion id (Cross-Site Request Forgery: CSRF)
...ทางเทคนิคขอไม่พูดถึง หาอ่านตามเว็บได้
2) เป็นภาระให้ server ต้องจำ session id ว่าเป็นของ user คนใด มีสิทธิอะไรบ้าง และจำข้อมูลอื่นๆ ของ user เป็นต้น
3) แล้วถ้าจะให้ user เดียวกัน login คนละอุปกรณ์ เช่น
เว็บก็ได้ มือถือก็ดี ...จะยุ่งยากมากขึ้น (ต้องก็อปปี้ session ไปให้)
4) และข้อเสียอื่นๆ ทีไม่ได้กล่าวถึง
:
😘 แต่เขาก็มีเทคนิคเพื่อแก้ทางนะครับ
.
ก็คือใช้สิ่งที่เรียกว่า "acces token "
ซึ่งการที่จะได้ acces token
ก็ต้อง login ด้วย user/password เพื่อไปแลกเอามา
...ต้องยืนหมู ยืนแมวกันก่อน ถึงจะได้ access token
จากนั้นเราจะใช้มันแทนการ login ได้เลย
.
ทำให้เราไม่ต้องป้อน user/password บ่อยๆ
แล้วแต่ละ user ก็จะได้ access token หน้าตาไม่เหมือนกันเด็ดขาด
พอถึงเวลา user ทำการ logout ออกไป ตัว access token ก็จะหมดอายุทันที
:
😙 ถึงตรงนี้ access token อาจเปรียบได้เหมือนกุญแจ
หรืออาจมองเป็นตั๋ว หรือบัตรผ่านก็ได้ ...แล้วแต่จินตนาการเปรียบเปรย
ข้อแตกต่างจาก session id ก็คือ
1) access token จะไม่ถูกเก็บใน cookies
2) access token จะเก็บข้อมูล ที่พอเปิดเผยได้
เช่น user_id, สิทธิต่างๆ , วันหมดอายุ
(ไม่เป็นภาระให้ server จำข้อมูลพวกนี้)
:
ยิ่งถ้านำ access token ไปใช้งานร่วมกับกลไกล login ก็จะเห็นข้อดี เช่น
1) ป้องกัน hacker ไม่ให้แอบใช้ session ด้วยวิธี Cross-Site Request Forgery (CSRF)
2) สามารถ login จากมือถือ และเว็บ เพียงแค่ใช้ user เดียวกัน ก็ทำได้ง่ายดาย
ก็แค่แจก access token ให้แค่นั้น ...ก็เหมือนที่ facebook ทำไง
(ไม่เก็บไว้ใน cookies ของ browser)
3) ตัว server สามารถทิ้งหน้าที่ login/logout อันเสียยุ่งยาก ...โยนไปให้ authenticate service ข้างนอกทำแทน
4) ตัว server ไม่ต้องมีภาระดูแลข้อมูล user
:
😀 ตัดกลับมาดูกลไก login ด้วย user/password ของ facebook
ซึ่งคอนเซปต์ตามรูปที่โพสต์เลยครับ (เป็นตัวอย่าง php)
สรุปง่ายๆ
- เวลา user ทำการ login
- มันจะแอบสวิซ์ไปหา facebook ให้ทำหน้าที่ login แทน
- เมื่อนั้น facebook จะโยน access token กลับมาให้เว็บเรา
- จากนั้น user จะใช้มันเป็นบัตรผ่าน ไม่ต้อง login ซ้ำอีกแหละ
:
ซึ่ง Access token ของเฟสบุ๊คมีหลายชนิด เช่น
-User Access Token
-App Access Token
-Page Access Token
-Client Token
แต่ละชนิดมีสิทธิแตกต่างกันได้ ขอไม่ลงลึกนะ
:
👉 เรื่อง session id กับ access token ที่เล่ามาทั้งหมดนี้
ถือเป็นขอหวานอันแสนหอมที่ hacker ชอบมากๆ
ถ้าพวกเขาขโมยได้ รับรองว่าจะสวมรอย user ที่กำลัง login ได้
จากนั้น hacker จะได้สิทธิทุกอย่างเหมือน user นั้นหมด ...เสร็จโจรละที่นี้
.
ยกเว้นเราจะ logout ออก
เพื่อให้ session id หรือ access token หมดอายุ
เมื่อนั้น hacker ก็จะหมดสิทธิสวมรอย
:
ในมุม user ก็แค่ล็อกอินใช้งานอย่างเดียว
ไม่ต้องสนใจ access token เบื้องหลังเลย
แต่ถ้าเป็น #โปรแกรมเมอร์ ต้องคำนึงถึงเป็นพิเศษ
เพราะขนาดสี่ตีนยังรู้พลาด นักปราชญ์ยังรู้พลั้ง
ยักษ์ใหญ่สุด พี่เบิ้มอย่าง facebook
ยังพลาดปล่อยให้ access token หลุดออกมาได้เลย จนเป็นข่าวสะเทือนใหญ่โต
.
👌 ด้วยเหตุนี้การเขียนโปรแกรม
ก็ขอให้คำนึงถึงเรื่อง access token ห้ามหลุดรอด
ให้ปลอดภัยจาก hakcker เป็นดีที่สุด
โชคดีทุกท่านครับ
:
:
เขียนโดย โปรแกรมเมอร์ไทย thai programmer
:
+++++++++++++
อ้างอิง
1) https://developers.facebook.com/…/h…/example_facebook_login…
2) https://developers.facebook.com/…/facebook-l…/access-tokens…
同時也有10000部Youtube影片,追蹤數超過2,910的網紅コバにゃんチャンネル,也在其Youtube影片中提到,...
「authenticate user」的推薦目錄:
- 關於authenticate user 在 โปรแกรมเมอร์ไทย Thai programmer Facebook 的最佳貼文
- 關於authenticate user 在 Pupe BNK48 Facebook 的最佳貼文
- 關於authenticate user 在 โปรแกรมเมอร์ไทย Thai programmer Facebook 的精選貼文
- 關於authenticate user 在 コバにゃんチャンネル Youtube 的最佳貼文
- 關於authenticate user 在 大象中醫 Youtube 的最佳貼文
- 關於authenticate user 在 大象中醫 Youtube 的精選貼文
- 關於authenticate user 在 開發者必備知識- HTTP認證(HTTP Authentication) 的評價
- 關於authenticate user 在 How to authenticate a User - Stack Overflow 的評價
- 關於authenticate user 在 Manually Authenticate User In Symfony - gists · GitHub 的評價
authenticate user 在 Pupe BNK48 Facebook 的最佳貼文
ประกาศ DIGITAL LIVE STUDIO ประจำวันที่ 14 - 15 มกราคม 2563 ที่ MBK Center 7th Floor โดยมีสมาชิกที่เข้าร่วมดังนี้
===================
BNK48 ขอเชิญแฟนคลับที่ต้องการเข้าชมร่วมเล่นกิจกรรมเพื่อได้รับสิทธิ์ชมหน้าตู้ โดยมีวิธีการร่วมสนุก มีดังนี้
1. โพสคำถามที่ท่านต้องการถามสมาชิก BNK48 ที่มา Digital Live Studio ในวันดังกล่าวพร้อมทั้งติดแฮชแท็กถึงเมมเบอร์ท่านนั้น (คำถามไหนที่ถูกใจทีมงานจะถูกนำไปถามในรายการ)
2. เมื่อพิมพ์คำถามจบให้พิมพต่อท้ายด้วย ชื่อจริง-นามสกุล //สองตัวแรกตามด้วยจุด// เป็นต้น
3. กดแชร์กิจกรรม ไปที่หน้าเฟสของท่าน (โดยต้องเปิด Public)
ตัวอย่างเช่น
อยากถามน้องปูเป้คนสวย ว่าระหว่างการร้องเพลง และการแสดงภาพยนตร์ชอบทำอะไรมากกว่ากัน #PupeBNK48
จะลงชื่อ จิรดาภา อิน.
(ตรงนี้นับเป็นสองตัวแรกตามด้วยจุดนะคะ อิ = 1 / น = 2 ตามด้วยจุด . เป็นต้น)
ปล.1 📌(เริ่มปักหมุดเวลา 19:30 และปิดกิจกรรมเวลา 21:00 )📌
ปล.2 แอดมินจะปักหมุดแบ่งตามวัน รบกวนเช็คก่อนส่งคำตอบนะคะ
4. คำตอบที่ทำตามกติกา จำนวน 50 ท่าน จะได้สิทธิ์เข้าชม ทางเพจจะประกาศในวันที่ 13 มกราคม 2563 เวลา 15.00 น. ที่หน้าเพจ BNK48 Digital Live Studio
## หมายเหตุ: คำตัดสินของทีมงานถือเป็นที่สิ้นสุด โดยทีมงานขอสงวนสิทธิ์ในการเปลี่ยนแปลงกติกาตามความเหมาะสม โดยไม่ต้องแจ้งให้ทราบล่วงหน้า ##
### เนื่องจากพื้นที่ที่กว้างขวางขึ้นรองรับปริมาณคนดูที่มากกว่าเดิม แฟน ๆ สามารถเข้าชมได้อย่างอิสระ แต่รบกวนเชื่อฟังทีมงานเพื่อความเป็นระเบียบเรียบร้อยอย่างเคร่งครัด ###
===================
วิธีการรับสิทธิ์เข้าชมหน้าตู้
1. ผู้โชคดี 50 ท่าน ต้องนำบัตรประชาชน มาเพื่อยืนยันตัวตนเพื่อเข้าพื้นที่รับชมการจัด Live เท่านั้น
2. ผู้โชคดี 50 ท่าน สามารถเข้าพื้นได้ก่อนผู้อื่น โดยทีมงานจะแบ่งโซนไว้ดังนี้
❤โซนนั่งพื้น ใกล้ชิดติดกระจก จำนวน 50 ที่ แบ่งเป็น
- โซนเด็ก จำนวน 5 ที่
- โซนผู้หญิง จำนวน 15 ที่
- โซนรวม จำนวน 30 ที่
3. สำหรับพื้นที่ที่เหลือ ผู้ชมทั่วไปที่มีความประสงค์จะเข้าดู สามารถเข้าไปหลังจากทีมงานประกาศเรียกผู้โชคดีเสร็จ โดยจะแบ่งเป็น 2 โซน ดังนี้
❤โซนยืน สดชื่นหัวใจ (30 คนขึ้นไป หรือจนกว่าที่จะเต็ม) และ
❤ โซนผู้ใช้ บันได ในเบื้องต้นขอจำกัดพื้นที่ไว้ 30 ที่ โดยอาจจะมีปรับเปลี่ยนหน้างานตามความหมาะสม
3. ลำดับการขอรับสิทธิ์เข้าดู จะเรียงตามในประกาศรายชื่อผู้ที่ได้รับสิทธิ์ โดยผู้ที่มีรายชื่อสามารถเข้าชมตามลำดับ เช่น ผู้ที่มีสิทธิ์คนแรก สามารถเลือกได้ว่าจะนั่งตรงไหน ตามที่กำหนดไว้ข้างต้น (นอกจากจะมีการสละสิทธิ์ จะทำให้สิทธิ์ที่นั่งถูกมอบให้คนในลำดับถัดไป)
4. ผู้ที่มีความประสงค์จะใช้บันได จะต้องแจ้งความจำนงตอนลงทะเบียน กับทีมงาน และถ้าหากมีผู้แจ้งความจำนงครบ ทีมงานจะปิดลงชื่อโซนนั้นทันที
5. ทีมงานจะเปิดให้ลงทะเบียนก่อนเวลาไลฟ์ 2 ชั่วโมง และสามารถเข้าพื้นที่ได้ก่อนตามลำดับในข้อที่ 3 (ซึ่งในกรณีพื้นที่เหลือบุคคลภายนอกสามารถเข้าชมได้ปกติ)
6. กฏ ระเบียบต่างๆ อาจมีการเปลี่ยนแปลงตาม ความเหมาะสม ทั้งนี้ขึ้นอยู่กับดุลยพินิจของทีมงาน
หมายเหตุ: หากผู้ที่ได้สิทธิ์เข้าชมตู้ปลามีประสงค์จะออกจากพื้นที่บริเวณตู้ปลาให้ทำการแจ้งคนรอบข้างตนเองไว้เพื่อเป็นการสงวนสิทธิ์พื้นที่ของตนไว้ ในกรณีออกไปห้องน้ำหรือติดธุระส่วนตัวซึ่งต้องกลับมาก่อนไลฟ์เริ่มเวลา30นาที
#BNK48 #BNK48DigitalStudio
Announcement of DIGITAL LIVE STUDIO for 14-15 January 2563 at MBK Center 7th Floor with members who participate as follows.
===================
BNK48 invites fan clubs who want to join the event to get a chance to join the cabinet with a way to join the fun.
1. questions you want to ask BNK48 members who come to Digital Live Studio on this day with hashtags to Member (which questions are liked by the team will be asked for).
2. When you typed a question, type it to end with real name - last name // First two, followed by point // etc.
3. Share the event to your Facebook page (without opening Public)
For example,
I want to ask my beautiful Little Pupe that between singing and acting films I like to do more. #PupeBNK48
I will sign Jirada Pa In.
(Here, it's the first two, according to the point. He xi 1 / n n 2 followed by the point. Etc)
P.S. 1 📌 (start pinning at 19:30 and closing event at 21:00)📌
P.S. 2 admin will pin it according to the date. Please check before sending the answer.
4. answers following the rules of 50 people will get access to the page. It will be announced on January 13, 2563 at 15.00 pm. BNK48 Digital Live Studio page
## NOTE: Teamwork judgments are final. The team reserves the right to change the rules accordingly without prior notice. ##
### Due to the expansive space, it supports more viewers than before. Fans can visit freely, but please obey the teamwork for strictly neat ###
===================
How to get access to the cabinet page
1. lucky 50 persons must bring a national ID card to authenticate to enter the viewing area. Live only.
2. lucky 50 persons can enter the floor before others. The team will be divided by the zone as follows.
❤ ❤ to sit in a close floor with a mirror. 50 places divided into 50
- 5 kids zone
- Women's zone of 15
- Total 30 zones
3. For the rest of the area, the general audience with the will will be able to enter after the team announces the lucky winners. They are divided into 2 zones as follows.
❤ Standing zone, heart refreshing (30 people up or until full) and
❤ Preliminary ladder user zone, limit your space to 30 places. You may be adjusted to your page according to your appearance.
3. View access order is sorted in the listing of eligible people who have lists. In order, the first eligible person can choose which seat above, (unless the waiver is forfeited. Will make seat rights be given to the next order)
4. Those who wish to use the stairs must inform the registered requirement with the team and if there is a full team of pinnacle, the team will immediately close the name of the zone.
5. Teams will open to register 2 hours before the live time and can enter the area first in order of 3 (which in case of external spaces can be visited normally)
6. The rules are subject to change according to decency. It depends on the discretion of the teamwork.
NOTE: If anyone has access to fish tanks, they wish to leave the area of the fish tank. Tell people around themselves to reserve their space in the case of toilet or personal business that we have to come back before the live starts at 30 The minute.
#BNK48 #BNK48DigitalStudioTranslated
authenticate user 在 โปรแกรมเมอร์ไทย Thai programmer Facebook 的精選貼文
+++ access token คืออะไรใน facebook ++++
😋 ปกติ facebook เปิดให้เว็บ (รวมทั้งแอพ) ที่เราเขียนขึ้น
สามารถใช้ระบบ login ของ facebook ได้
ทำให้เว็บนั้นได้สิทธิเข้าถึงข้อมูลส่วนตัวของ user นั้นๆ บน facebook
....
Continue Reading+++ What is access token on Facebook ++++
😋 Facebook is usually open for web (including apps) that we write up.
Facebook login system can be used
Make that web access to user's personal information on Facebook.
.
And in many sites, we must have seen.
Just have an account on Facebook, you can log in.
No need to waste time. Fill out a new subscription.
:
In this post will quote
Using Facebook Login
Behind that success, Facebook will give away access token
So that any web can manage user login
:
Before talking about access token, let me go back to the age of 2534
When "Timberners-Lee" delivered the world's first website.
It's a common thing that human beings use to be.
:
❣ but my weaknesses.... is in the heart
Hey, it's not the weaknesses of the website.
Well it uses HTTP potocol
Which is stateless. Don't remember any status.
The meaning is that Server is very short of memory. Alzheimer's disease.
When it gets request from browser
I don't remember where it came from???
Who sent it, I can't remember anymore!!!!!
:
🤔 to solve this cuddle nha technically
He will give you a server to send session id (or session token)
Which session id is something we can't read and long
It will be sent to browser. Keep this in the cookie.
.
.. Wrong is not that cookie.. but cookies are text
Server will send session id to browser
Keep the value in cookies (keep text on browser side)
:
Programming time on server side
Like PHP when using session _ start ();
Will tell browser to collect session id in text photos such as
PHPSESSID=tqb4s5q7k25234eabbvs11dp02
(session id is a random code)
:
But if it's another language, it may be seen in other words.
E.g. JSSIONID (JAVA EE), PHPSESSID (PHP), and ASPSESSIONID (Microsoft ASP).
.
😉 Even here session id... may think it's a ID code.
:
From now on when users click on what on the web page
Browser will be kind.
Secretly sending this session id to server automatically
Make the server recover from Alzheimer's.
... I remember where the request sent this... yay yay
.
So if the request sent in
It has the same session id
It's considered the same friends.
(Computer vocabulary says these request is in the same SESSION)
.
What if it's not the same session id
It's considered that request is not the same people.
:
👉 Benefits of session id
Will be used in conjunction with login / logout mechanism
1) When user name XXX comes in, there will be a session id.
2) When another user name YY does login, there will be a session id as a different ID.
3) When both users do logout, it will expire session id.
:
Question if we went to wash all the cookies in browser what would happen?
- answer for session id will be gone.
- So who secretly login is holding this web? What is that... huhu
- I have to logout automatically for new login... So sad. Haha.
(server doesn't remember us anymore
Because browser doesn't send session id)
:
Session id sounds like good
😨 but using user / password to login will have disadvantage such as
1) Easy to hacker to sneak in session
To wear sesion id (Cross-Site Request Forgery: CSRF)
... Technically, let's not talk about it. Read it on the
2) It is a burden for server to remember the session id. What rights you have and remember other information of user etc.
3) If you want to give the same user, login different devices such as
Web is fine. Mobile phone is good... It will be more difficult. (I have to copy session)
4) and other disadvantage not mentioned
:
😘 but he has a technique to solve the way.
.
Well, use what's called "acces token"
To get access token
I have to login with user / password to exchange it.
... We have to stand in the cat before we get access token.
Then we can use it instead of login
.
Keep us from feeding user / password often
And each user will get access token. Different look alike.
When it's time for user to do logout, access token will expire immediately.
:
😙 Here access token may compare like a key
Or maybe you can see it as a ticket or a pass... It's up to the imagination.
Difference from session id is
1) access token will not be kept in cookies
2) access token will collect information that can be revealed.
e.g. user _ id, rights, expiration date
(Not a burden for server to remember these information)
:
If you use access token with login mechanism, you will see the advantages like
1) Prevent hacker from using session by Cross-Site Request Forgery (CSRF)
2) Can login from mobile phone and just use the same user.
Just giving away access token... It's like Facebook.
(Not stored in browser cookies)
3) The server can leave a hassle login / logout duty... Throw it to authenticate service outside.
4) Server doesn't need to take care of user information.
:
😀 Cut back to see login mechanism with facebook user / password
The concept is as shown in the photo that I posted. (as an example of php)
Simple summary
- user time login
- It will sneak a switch to Facebook to do login instead.
- Then Facebook will throw back access token to our web
- Then user will use it as a pass. No need to login again.
:
There are many types of access token of Facebook such as
-User Access Token
- App Access Token
- Page Access Token
-Client Token
Each type has different rights. I can't ask for deep.
:
👉 session id and access token all this story
It's a sweet, fragrant hacker. I like it very much.
If they can steal, they can wear a login user.
Then hacker will get all rights like user... done here
.
Except we logout
To make session id or access token expire
Then the hacker will be out of bogs.
:
In the user corner. Just login.
Don't mind access token behind the scenes
But if it's a #programmer, you need to be extra mindful.
Because even four feet know that the philosopher knows.
The biggest giant. Big brother like Facebook.
Still missed it. Let access token out so that it's a big news.
.
👌 So, programming
Let's be mindful about access token. Don't fall off.
Be safe from hakcker to the best
Good luck to all of you.
:
:
Written by Thai programmer thai programmer
:
+++++++++++++
Reference
1) https://developers.facebook.com/docs/php/howto/example_facebook_login?locale=th_TH
2) https://developers.facebook.com/docs/facebook-login/access-tokens?locale=th_THTranslated
authenticate user 在 Manually Authenticate User In Symfony - gists · GitHub 的推薦與評價
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;. // Manually authenticate user in controller. ... <看更多>
authenticate user 在 開發者必備知識- HTTP認證(HTTP Authentication) 的推薦與評價
HTTP request header: Authorization: Basic YWxpY2U6c3VwZXJtYW4= Basic故名思義,是最簡單方便快捷的方法,user ... ... <看更多>