Developed an ACL system to enable granular control over resource access. Implemented ACL rules to restrict or allow specific actions on resources based on user roles, attributes, or custom conditions. Integrated libraries like node-acl to manage ACL rules and enforce access restrictions.
🔐 User registration and authentication
🔐 Role-based access control (RBAC)
💡 Fine-grained access control at the resource level
🛡️ Secure session management
🔍 Error handling and logging
Clone this repository :
git clone <repository-url>
cd backend
and npm install
all in the package.json
Create a .env
file in the root directory.
Define the following environment variables in the .env file:
SECRET_KEY : Secret key used for JWT token signing.
Other configuration variables if required.
###Start the server:
🚀 npm start
The server will start running on http://localhost:9000.
🚀 POST /registerAsAdmin - Register an admin user. Requires authentication and admin role.
🪂 Usage and Authorization :
Use the /registerAsAdmin
endpoint to register an admin user by providing the required data in the request body. You need to authenticate with a valid token and have the admin role to access this endpoint.
For authentication, include the token in the Authorization header of the request using the Bearer scheme.