How can I stop throwing "403, 'Forbidden'" by apigility for non-rest/non-rpc controllers?

At this line of code throw “403, ‘Forbidden’” for non-rest/non-rpc controllers but it was planed to be applicable only for rest/rpc controllers.

At this line of code is set ‘ZF\MvcAuth\Identity’ which is getted only in RestController here .

I am trying to add authentication adapter as I’ve describe here How to add authentication adapter to controller? .

Please stay in your original post and do not open multiple threads on the same topic. Thanks!

Original post was too overall. Now I am interesting how to override getTypeFromMap() method of DefaultAuthenticationListener or it __invoke method or how to stop executing apigility for non-rest/non-rpc controllers?