itenium-be / ASP.NET-WebApi

.NET Competence Center: WebApi course
2 stars 0 forks source link

ASP.NET WebApi

Prep

postgres

Login: postgres / admin
Port: 5433
Database: socks

cd WebApi/docker-compose
docker compose up -d

WebApi

/WebApi: Swagger @ localhost:5001/swagger

Template: FullStackHero

Get a Token

Swagger

Tokens -> POST /api/tokens
Tenant: root

{
    "email":"admin@root.com",
    "password":"123Pa$$word!"
}

Postman

See postman for a postman collection.
Or go with an open-source & free alternative that looks exactly the same:

In Visual Studio Code:

cURL

CURL command for getting a token:

curl -X POST \
  'https://localhost:5001/api/tokens' \
  --header 'Accept: */*' \
  --header 'tenant: root' \
  --header 'Accept-Language: en-US' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "email": "admin@root.com",
  "password": "123Pa$$word!"
}'

Features

REST

See REST-JWT.pptx for some general REST infos. Or see our specific REST-JWT-Postman-DevTools session.

Topics