Sign inSign up

tg44/tutelar-example-todoapp-akkahttp

By tg44

•Updated almost 7 years ago

Image
0

898

tg44/tutelar-example-todoapp-akkahttp repository overview

Mini example webapp for tutelar⁠ auth microservice.

TODOAPP SWAGGER⁠

TUTELAR SWAGGER⁠

docker-compose up -d

⁠Examples

Register:

$ curl --insecure --silent \
>  -XPOST \
>  -H "Content-Type: application/json" \
>  --data '{"username": "ksisu", "password": "Ksisu123"}' \
>  https://lvh.me:9443/basic/register | jq .
{
  "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NTY0Mjg3MzMsImlkIjoiZTk3NDFiZWYtNGYyYS00YjY0LTgzYTEtYWEzOTkyMjQwOGRhIn0.ywrV2tae81isxFgM_oZDQFJxYZgSutxGUTIgTuU-UDs"
}

Create a todo item:

$ curl --insecure --silent \
> -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NTY0Mjg3MzMsImlkIjoiZTk3NDFiZWYtNGYyYS00YjY0LTgzYTEtYWEzOTkyMjQwOGRhIn0.ywrV2tae81isxFgM_oZDQFJxYZgSutxGUTIgTuU-UDs" \
> -XPOST \
> -H "Content-Type: application/json" \
> --data '{"title": "Example", "done": false}' \
> https://lvh.me:9443/api/todo | jq .
{}

List todo items:

$ curl --insecure --silent \
> -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NTY0Mjg3MzMsImlkIjoiZTk3NDFiZWYtNGYyYS00YjY0LTgzYTEtYWEzOTkyMjQwOGRhIn0.ywrV2tae81isxFgM_oZDQFJxYZgSutxGUTIgTuU-UDs" \
> https://lvh.me:9443/api/todo | jq .
[
  {
    "done": false,
    "title": "Example"
  }
]

Tag summary

Content type

Image

Digest

Size

294.5 MB

Last updated

almost 7 years ago

docker pull tg44/tutelar-example-todoapp-akkahttp