This document provides comprehensive documentation of the authentication system for the MbetterClient API endpoints, ensuring that logged-in users (admin/cashier) can access the API endpoints securely.
The MbetterClient web dashboard implements a comprehensive authentication system that supports multiple authentication methods and role-based access control. This document outlines how authentication works and which endpoints require authentication.
## Authentication System Architecture
## Authentication Methods
The MbetterClient application uses a dual authentication system:
-**Role-Based Access Control**: Admin, cashier, and normal user roles
-**API Token Support**: Long-lived tokens for programmatic access
-**Proper Error Handling**: Clear error responses for authentication failures
-**Extensive Coverage**: All sensitive endpoints are properly protected
-**Public Endpoints**: Limited public endpoints for bet verification
This authentication system ensures that logged-in users (admin/cashier) can securely access the API endpoints while maintaining proper access control and security.