First solution using glass
A simple solution that may meet your need, but as @vklidu pointed me out in the comments, this is not working well with other lights.
The area where the light is placed is surrounded by a big box (selected below) with an open face where the portal is placed.
The node tree for this surrounding box is simply a "glass" with IOR set to one (flat transparency).
The light source (an area) also has a node tree:
It is emission shader except when the transmission depth (what comes from glass/transmissive materials) is at least 1.
Additionally, the surrounding box has a solidify modifier, as if not the light may go through it at the intersection with the floor plane.
There is some limitations, depending on the shape of the surrounding box (from which points of view you want to catch that).
Second solution, using transparency
The principle is the same with transparency instead of glass, but needs to fake a bit. But that allows other lights to work well it seems.
Here the mask object is extended along the floor to avoid light going outside of it where the mask meets the floor vertically.
So same mask shape as for @vklidu answer, thanks to him, but different node trees.
The nodes for the area lamp:
The ones for the mask: