Skip to content

Instantly share code, notes, and snippets.

@AlejandroRuiz
Created November 24, 2018 02:45
Show Gist options
  • Save AlejandroRuiz/33b620f33280aeae1c0d67b72dc1184c to your computer and use it in GitHub Desktop.
Save AlejandroRuiz/33b620f33280aeae1c0d67b72dc1184c to your computer and use it in GitHub Desktop.
ASP.NET Core Identity with Cosmos DB (MongoDB)
//api/v1/user/register
//Request
{
"Email": "demo@gmail.com",
"Password": "Test1234!",
"ConfirmPassword": "Test1234!",
"Name": "Alejandro",
"LastName": "Ruiz",
"City": "Guadalajara"
}
//Response
{
"token": "token",
"userName": "demo@gmail.com",
"email": "demo@gmail.com"
}
//api/v1/user/login
//Request
{
"Email":"alex@gmail.com",
"Password":"Test1234!"
}
//Response
{
"token": "token",
"userName": "alex@gmail.com",
"email": "alex@gmail.com"
}
//api/v1/user/userdata
//Request
//Header
//Authorization: Bearer yourToken
//Response
{
"userName": "demo@gmail.com",
"name": "",
"lastName": "",
"city": null,
"email": "demo@gmail.com"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment