Context Data

You can use ctx.data to store any data, such as attaching a user using an authentication middleware (see middlewares for example):

app.middleware((ctx) => {
ctx.data.name = "Charles";
});
app.get("/", (ctx) => {
return new TextBody(ctx.data.name);
});