JWT Auth System for Freshers Assignment
JWT Auth System for Freshers Assignment
The necessary components within the compressed zip file are the code for both services, documentation, and a database dump. If any component is missing, the submission will result in disqualification, highlighting the importance of a complete and thorough submission .
The connection allows the main service to communicate with the public API microservice to access its functionalities. This setup leverages microservice architecture principles, enabling separation of concerns and allowing each service to operate independently while still interacting securely and efficiently with the other .
Comprehensive documentation is essential because it allows others, especially those who are new to the project, to easily understand the setup and execution processes. It includes step-by-step instructions, necessary commands, configurations, and serves as a guide to understand system operations and dependencies .
API endpoints serve as the interaction points between the user and the system, facilitating operations such as user registration, login, protected access, candidate addition, and retrievals through both secured and public service channels. They dictate how information is handled, secured, and served to ensure smooth operation and inter-service communication .
The public API microservice setup involves creating a microservice that authorizes access through publicly available API keys. It should include endpoints such as retrieving user profile information and listing all candidates associated with the user's API key. The aim is to allow access to certain functionalities without traditional user credential authentication .
The evaluation criteria include: functionality of the authentication system, accessibility of public API endpoints, code quality regarding structure and best practices, clarity and comprehensiveness of documentation, design of microservices architecture, and security of the authentication system and communications .
The user database must include fields such as id, first_name, last_Name, email, and password_hash. These fields are essential to uniquely identify users, store credentials securely, and facilitate user authentication processes .
Code quality is assessed based on how well-structured and modular the code is and whether it follows best practices. The presence of necessary comments that aid in understanding the code also contributes to the assessment. The code should be clear and maintainable, facilitating the ease of updates and debugging .
Security is ensured by using JWT tokens for verifying the identity of users for protected endpoints. After login, JWT tokens are generated and used to authenticate users. Public API keys are utilized to ensure secure access to public API microservices without requiring user credentials, thereby maintaining a secure access flow .
The core components required are a main service responsible for handling user authentication and authorization using JWT, and a public API microservice that provides a public API key for accessing main service routes without needing login credentials. The assignment specifies creating endpoints for user registration, login, and protected access in the main service, and public profile retrieval and candidate access in the public API microservice .