Admin login
Closed this issue · 3 comments
battila7 commented
Implement admin login using JWT.
Provide a login endpoint (username + password) that returns a JWT token upon success.
The JWT token can be used for subsequent admin API calls.
battila7 commented
The following endpoint should be created to allow administrators to login:
POST /admin/login
Request
{
"username": String,
"password": String
}
Response
On success:
{
"token": String
}
battila7 commented
Common error format for request failures:
{
"error": {
"code": String,
"target": String,
"details": [Error]
}
}
battila7 commented
Remark:
The admin password can be stored in plain text format for now, but in the future it will be BCrypt'd by the Bootstrapper.