Authentication microservice built with Node.js that follows Clean Architecture + TDD + SOLID + DDD + functional programming principles
A simple API built with Node.js that follows Clean Architecture + TDD + SOLID + DDD principles
to run the project you need to have npm installed on your machine and
the mongo DB
to get the npm https://www.npmjs.com/get-npm
git clone https://github.com/AdilsonFuxe/clean-auth-microservice.git
Enter into the server folder
cd clean-auth-microservice
npm install or yarn
npm run build or yarn build
npm start or yarn start
npm test or yarn test
POST https:/localhost/api/v1/signup
// POST https:/localhost/api/v1/signup
// Request Body
{
"firstName": "any_name",
"lastName": "any_name",
"email": "[email protected]",
"password": "any_password",
"passwordConfirmation": "any_password"
}
// Response Body
{
"accessToken": "any_access_token"
}
POST https:/localhost/api/v1/signin
// POST https:/localhost/api/v1/signin
// Request Body
{
"email": "[email protected]",
"password": "any_password"
}
// Response Body
{
"accessToken": "any_access_token"
}
GET https:/localhost/api/v1/me
// Get https:/localhost/api/v1/me
// HEADER x-access-token = any_access_token
// Response Body
{
"id": "any_id",
"firstName": "any_name",
"lastName": "any_name",
"email": "[email protected]"
}
Patch https:/localhost/api/v1/forgot
// Patch https:/localhost/api/v1/forgot
// Request Body
{
"email": "[email protected]"
}
Patch https:/localhost/api/v1/reset-password
// Patch https:/localhost/api/v1/reset-password
// Request Body
{
"email": "[email protected]",
"accessToken": 092498,
"password": "new_password"
}
Delete https:/localhost/api/v1/signout
// Delete https:/localhost/api/v1/signout
// HEADER x-access-token = any_access_token
// Request Body
Status Code 204
{}