Skip to content

Instantly share code, notes, and snippets.

@larrycustodio
Created October 26, 2019 06:32
Show Gist options
  • Save larrycustodio/86e0426f7bb9902c22932a2c562b6ee6 to your computer and use it in GitHub Desktop.
Save larrycustodio/86e0426f7bb9902c22932a2c562b6ee6 to your computer and use it in GitHub Desktop.
gist
{
"info": {
"_postman_id": "57df8b22-65a2-4790-a6a3-17d8f833d864",
"name": "User Authentication",
"description": "Describes how to authorize with the application",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "User Login",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"",
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"tests[\"Response should contain a JSON web token\"] = typeof JSON.parse(responseBody).accessToken === \"string\";",
""
]
}
}
],
"request": {
"url": "https://api-dev.helloextend.com/auth/login",
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"email\": \"REPLACE_PASSWORD\",\n\t\"password\": \"REPLACE_PASSWORD\"\n}"
},
"description": "Grants a valid user a JWT"
},
"response": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment