Store Session and then request

Hi! I wanna know if any of you had something like I’m trying to do:

  • I have an external point which I need to access urls to get member profiles, but this is an area that I need basic authentication, made with php. From enonic, I need to perform a login on this area and then access the urls I need, otherwise I cant use them. How can I do that?

I know basic auth is supported by the Java httpClient, which the lib-http-client is based on.
Apparently, passing header values to the request is all you need?

Found this form an example of using the java version: httpget.addHeader(“Authorization”, "Basic " + encodedAuth);

NB! I have not tried this myself, but there is a header parameter option in lib-http-client too, so it should work!

I’ve already tried that and didn’t worked.

I had to perform this with PhantomJS. Another sucessfull alternative was using Selenium Webdriver :slight_smile:

Interesting - we’ll have to check this out then!