Login to Authentication service and retrieve a short-lived JWT token to use as Authorization header for session.
URL : /api/v1/login
Method : POST
Auth required : YES
Permissions required : role: customer
Data constraints
Provide loginID (username), password, and applicationId to login to auth.evidencity.com
curl -k -X POST -H "Content-Type: application/json" \
-d '{"loginID":"${FUSIONUSER}","password":"${FUSIONPASS}", "applicationId": "${FUSIONAPP}"}' \
https://rest.evidencity.com/v1/login | jq '.token' | tr -d '"' > $HOME/.evidencity/token
{
"loginID": "<username|email>",
"password": "<login-password>",
"applicationId": "<fusionauth-evidencity-application-id>",
}
Condition : If everything is OK the following response will be sent which includes a JWT token in the token field.
Code : 201 CREATED
Content example
{
"statusCode":200,
"token":"<long-JWT-token>",
"user":{
"id":"<id>",
"username":"<username>",
"usernameStatus":"ACTIVE",
"verified":true,
"active":true,
"email":"email@evidencity.com",
"firstName":"<First-name>",
"lastName":"<Last-name>",
"registrations":[
{
"applicationId":"<app-id>",
"id":"<id>",
"roles":["customer"],
"usernameStatus":"ACTIVE",
"verified":true
}
],
"tenantId":"<tenant-id>",
"twoFactor":{}
}
}
Note : Additional fields are not included in the above example
Condition : Invalid credentials
Code : 401 Unauthorized