I want to run authentication/authorization only for the calls that come from HTTP requests.
The method on the controller I want to have authentication/authorization enabled is called from more than one source. In this case, it can be either called by another controller or by a direct HTTP request.
Can I turn off authentication/authorization for the calls that come from other Controllers?
Just read further if you haven't got this clear enough yet.
Let's say I have a method doIt() on a Controller A. I also have a Controller B, in which I inject controller A. At some point on Controller B, I call 'a.doIt()', but I can also call doIt() from an HTTP call to doIt.do. I want to test the call for authentication/authorization if the call comes from an HTTP call, but not if it comes from Controller B.