View as Markdown

Take a high-value payment#

Level 3: a verified identity and a hardware passkey. Anything weaker is refused.

Level 3: A person verified at the highest level approves with a hardware passkey.
Class irreversible: Cannot be undone. The app creates the approval for that exact request, and it works once.
routes.append(route("POST", "/payees/{payee}/transfers", "transfers:send", cls="irreversible", level=3,
                    authn="hardware", resource="payee:{payee}", amount_field="/amount", summary="Send a bank transfer",
                    body={"amount": "a decimal string, e.g. 4000.00", "currency": "e.g. EUR"}))
templates["transfers:send"] = "Transfer {amount.max} {amount.currency} to {scope}"


@app.post("/payees/<payee>/transfers")
def transfer(payee):
    # Level 3: an identity verified to eIDAS high, and a passkey that never leaves its device.
    order = request.json
    return {"sent": order["amount"], "currency": order["currency"], "to": payee, "level": g.allowedby.level}, 201

What the test proves#

  • a passkey that is synced, or that no hardware vouches for, cannot reach level 3: refused
  • with a hardware passkey and an identity verified to level 3, the person approves: 201
  • the approval works once