You can do it in many ways. For example by implementing own Security voter that will check matched route