Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
290
OLAP connection with basic authentication
posted

Hello,

I hope this is a simple question.  I'm trying to connect to a pump hosted on my webserver that has basic authentication turned on.  How do I set the user credentials on the OlapXmlaDataSource object?  I'd like to be able to set the userId and password required to access the pump.

Thanks

Parents
No Data
Reply
  • 49378
    Verified Answer
    posted

    Hello r1owner,

    This scenario may be implemented by setting the OlapXMLA data source's requestOptions option. For instance:

    requestOptions: {

        withCredentials: true,

        beforeSend: function (jqXHR, options, requestOptions) {

            var xhr = options.xhr();

            if (requestOptions.withCredentials && "withCredentials" in xhr) {

                jqXHR.setRequestHeader("Authorization", "Basic [Base64EncodedData]");

            }

        }

    }

     

    Hope this helps. Please feel free to contact me if you have any questions.

Children
No Data