Download the PHP package sakmobile/moph-auth without Composer
On this page you can find all versions of the php package sakmobile/moph-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package moph-auth
MOPH Auth PHP Library
ไลบรารีสำหรับเชื่อมต่อ Provider ID (MOPH Account Center) ด้วย OAuth2 รองรับการ Login และดึงข้อมูลผู้ใช้งาน (Profile) สำหรับระบบโรงพยาบาล / หน่วยงานสาธารณสุข
✨ Features
- 🔐 Login ด้วย Health ID (OAuth2)
- 🎫 รับ Access Token (Health + Provider)
- 👤 ดึงข้อมูลผู้ใช้งาน (Profile)
- ⚡ ใช้งานง่าย (Pure PHP / รองรับทุก Framework)
- 📦 ใช้ผ่าน Composer ได้
📦 Installation
ติดตั้งผ่าน Composer:
⚙️ Configuration
สร้างไฟล์ config:
🚀 Usage
1. สร้าง Login URL
2. Callback (รับ code และแลก token)
3. ดึงข้อมูล Profile
📊 ตัวอย่างข้อมูลที่ได้
🔐 หมายเหตุด้านความปลอดภัย
hash_cidเป็น SHA256 ของเลขบัตรประชาชน (ไม่สามารถ decode ได้)- ควรใช้
hash_cidเป็น User ID ในระบบ - หลีกเลี่ยงการเก็บ CID จริง (PDPA)
🧠 Tips
ดึงตำแหน่งจาก array ซ้อน
แปลงข้อมูลให้ใช้ง่าย
🔄 Flow การทำงาน
🛠 Requirements
- PHP >= 7.4
- cURL extension
📄 License
MIT License
👨💻 Author
Sakwerachai
⭐ Contributing
Pull requests ยินดีต้อนรับ 🙌 หากพบปัญหา สามารถเปิด issue ได้เลย
❤️ สนับสนุนค่ากาแฟ
หาก Library นี้ช่วยให้งานของคุณง่ายขึ้น ☕ สามารถสนับสนุนผู้พัฒนาเพื่อเป็นกำลังใจในการพัฒนาต่อได้ครับ
🙏 ทุกการสนับสนุนมีความหมายมาก
ช่องทางสนับสนุน
- 💸 PromptPay:
0991013326 - 📱 หรือช่องทางอื่น ๆ ตามสะดวก
🛒 บริการ / ติดต่อพัฒนาเพิ่มเติม
สามารถติดต่อได้ที่:
- 🌐 GitHub: https://github.com/sakmobile/moph-auth
- 📧 Email: [email protected]
- 💬 Line: yourlineid
🤝 สำหรับพี่น้อง IT โรงพยาบาล
โปรเจคนี้จัดทำขึ้นเพื่อ:
🎯 แบ่งปันความรู้ และช่วยลดภาระงานของเพื่อน ๆ พี่ ๆ IT โรงพยาบาล
สามารถ:
- ✅ นำไปใช้งานได้ฟรี
- ✅ แก้ไข / ปรับปรุงได้
- ✅ ต่อยอดได้เต็มที่
ภายใต้ MIT License 🎉
📢 หมายเหตุเพิ่มเติม
- Library นี้เป็น Open Source
- ไม่มีค่าใช้จ่ายในการใช้งาน
- หากพบปัญหา หรืออยากให้เพิ่ม feature สามารถเปิด Issue ได้เลย
⭐ ฝากกด Star ให้กำลังใจ
หากโปรเจคนี้มีประโยชน์ ฝากกด ⭐ บน GitHub เพื่อเป็นกำลังใจด้วยนะครับ 🙏
👉 https://github.com/sakmobile/moph-auth