The context is the object passed between the middlewares and controllers, inside it contains everything necessary for the API. Among your options is:
Swifti object to easily manage cookies
.
A Swifti request
object.
A Swifti response
object.
Recommended property for passing properties between middlewares and controllers.
const middleware = new Middleware((ctx, next) => {
const user = validateToken(ctx.req.headers.token);
ctx.state.user = user;
next();
});