Cookie authentication for rest api plugin fails

JIRA DC version: 8.22.2

PLugin developed: Rest Resource

In the dev environment, cookie authentication works for default JIRA rest api. But for the rest plugin it fails. Using atlassian RestClient, receive RestClientExcption, status 400 - do not have access to issuetype as an annonymous user.