Title here
Summary here
You are building Pionia Shop. Browsing the catalog can stay public. Creating products, placing orders, and topping up a wallet should only work for the right people. This section teaches that story without jargon piles.
product.listcustomer.login returns a JWT.Authorization: Bearer ….JwtAuthentication attaches her user to the request.#[Authenticated] / #[Can] on the action decide if she may continue.orders or wallets.flowchart LR Login["customer.login"] --> Token[JWT] Token --> Call["order.place + Bearer"] Call --> Jwt[JwtAuthentication] Jwt --> Attr["#[Authenticated] / #[Can]"] Attr --> Work[placeAction]
| Step | Guide | Idea |
|---|---|---|
| 1 | JWT authentication | Issue and verify tokens |
| 2 | Protecting actions | #[Authenticated], #[Can], exemptions |
| 3 | Authentication & authorization | Custom backends and secret hygiene |
| 4 | Security utilities | Password hashing, OTPs, encryption |
curl -s -X POST http://127.0.0.1:8000/api/v1/ \
-H "Content-Type: application/json" \
-d '{"service":"customer","action":"login","email":"ada@pionia.shop","password":"secret"}'Use the returned token on protected actions. Mark product.create or order.place with #[Authenticated] so anonymous callers never reach your database code.
#[Authenticated(except: ['login', 'register'])] on CustomerServiceJWT_SECRET in tracked files — use .envLogin tokens for customers.
Attributes for catalog and checkout.
Wire this into Pionia Shop.