-
Notifications
You must be signed in to change notification settings - Fork 0
Authentication API
Christopher Posada edited this page Apr 16, 2019
·
4 revisions
api/users/authenticate
{
"Username": "jsnow",
"Password": "Password#1"
}
{
"id": 5,
"username": "jsnow2",
"firstName": "John",
"lastName": "Snow",
"imageUrl": "/api/images/4/16/19/7dbaa88c-da3c-4e58-b8dd-7209645dbc70.png",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6IjUiLCJuYmYiOjE1NTU0NDQzNDAsImV4cCI6MTU1NjA0OTE0MCwiaWF0IjoxNTU1NDQ0MzQwfQ.nMjmhDBJ6ahQfcjmDKagKucS3w-ilert4C9lERll3mI"
}
Error 400
{
"message": "Username or password is incorrect"
}
Pop the token you get back in the header for any actions that require auth ie:
Authorization | Bearer token.willbe.here
LearningTogether @ BuildIt
http://ec2-18-224-56-34.us-east-2.compute.amazonaws.com/api
https://bettertogether.buildit.systems/api