Auth Service
User Authentication- port: 8080 https://app.swaggerhub.com/apis/Afeka2020/ASIS/1.0.0
Authentication Workflow The authentication flow is simple:
The user sends a request to get a token bypassing his credentials.
The server validates the credentials and sends back a token.
With every request, the user has to provide the token, and the server will validate that token.

Auth user
POST
/auth/
Request only the token to check if it is correct and exists. Returns the user profile. It is checking for access, and prevent outside hacking and unauthorized persons to use the system.
Request Body
token
string
{
"email": "string",
"id": "string",
"name": {
"first": "string",
"last": "string",
"middle": "string"
},
"role": "ADMIN",
"username": "string"
}
Login User
POST
/auth/login/
Log the user into the system with username and password. The system checks in the database if the user exists, logs him in and gives him a new token after authentication for some session time.
Request Body
username
string
password
string
{
"token": "string",
"user": {
"email": "string",
"id": "string",
"role": "ADMIN",
"username": "string"
}
}
Logout user
DELETE
/auth/logout/
Logout the user from the system and delete the token
Successfully logout user
Last updated
Was this helpful?