This one is unusual so I hope it will be a challenge for alfresco veterans
I need to make a windows authenticated REST API call from a behavior bound to a onContentRead policy. Windows authentication must be provided from a user that triggered onContentRead event. Is there any possible way to do this?
Sorry i wasn't clear in the start: I'm trying to call external REST using windows authentication of the user that triggered the event. I'm using AuthenticationUtils and I can get the username of the user that initiated the event but I can't seem to get NTML authentication provider to use with http client making the request. Also, I tried to use the Apache WinHttpCLient to make the REST API call but with no success. This is the code:
It's interesting that the above code works when sending POST to external REST service from the ServiceTask in Process Services (in the implementation of the JavaDelegate interface). Any help would be appreciated.