Various resource handlers need a usable and authenticated XWikiContext (access the database and test rights) even if they are not executed in the context of a specific document.