Provides authentication services.
Dev https://dev-authentication-common-service.treatproject.tk/
POST /users
Request
{
"username": "[email protected]",
"password": "securepassword"
}
Response
{
"roles": [
"ADMIN"
],
"_id": "5d1a4b8dba180f9cd1daba5d",
"username": "[email protected]",
"password": "64e936713937610581039f9a00bba386425c96c431b311d61496c04a7f39ae1c",
"source": "LOCAL",
"__v": 0
}
GET /users
Response
[
{
"roles": [
"ADMIN"
],
"_id": "5d1a4b8dba180f9cd1daba5d",
"username": "[email protected]",
"password": "64e936713937610581039f9a00bba386425c96c431b311d61496c04a7f39ae1c",
"source": "LOCAL",
"__v": 0
},
...
]
POST /tokens
Request
{
"username": "[email protected]",
"password": "securepassword"
}
Response
{
"_id": "5d1a51def76ddba0c557d4c6",
"user": {
"roles": [
"ADMIN"
],
"_id": "5d1a4b8dba180f9cd1daba5d",
"username": "[email protected]",
"password": "64e936713937610581039f9a00bba386425c96c431b311d61496c04a7f39ae1c",
"source": "LOCAL",
"__v": 0
},
"body": "3adfb205-1bf9-445d-b15a-c310deb6a923",
"__v": 0
}
GET /tokens/:body
Response
{
"roles": [
"ADMIN"
],
"_id": "5d1a4b8dba180f9cd1daba5d",
"username": "[email protected]",
"password": "64e936713937610581039f9a00bba386425c96c431b311d61496c04a7f39ae1c",
"source": "LOCAL",
"__v": 0
}