Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

jp_golay
Contributor

AsStaticHeaderUserViaProxy

Hi,

We want to use a virtual proxy but set the "Authentication Method" to "Header authentication dynamic user directory"

I have errors connecting using AsStaticHeaderUserViaProxy should have something as AsDynamicHeaderUserViaProxy

I get the connections using rest sdk but how to achieve using .NET sdk?

1 Reply
Luminary
Luminary

Re: AsStaticHeaderUserViaProxy

Hi,

do you mean DynamicHeader authentication with SessionID?

You can use this:

 public static class LocationExtensions_akquinet
    {
        public static void AsExistingSessionViaProxy(this ILocation location, string sessionId, bool useSsl = true, string cookieHeaderName = null)
        {
            var SecurityProperty = location.GetType().GetProperty("Qlik.Engine.ISecureLocation.Security", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);

            var Security = SecurityConfigurator.OpenAsExistingSessionViaProxy(sessionId, useSsl, cookieHeaderName ?? "X-Qlik-Session");

            SecurityProperty.SetValue(location, Security);
        }

        private static PropertyInfo SecurityConfiguratorProperty = null;
        internal static Qlik.Sense.Communication.Communication.Security.ISecurityConfigurator SecurityConfigurator
        {
            get
            {
                if (SecurityConfiguratorProperty == null)
                    SecurityConfiguratorProperty = typeof(LocationExtensions).GetProperty("SecurityConfigurator", BindingFlags.Static | BindingFlags.NonPublic);
                return SecurityConfiguratorProperty.GetValue(null) as Qlik.Sense.Communication.Communication.Security.SecurityConfigurator;
            }
        }
    } 

bye

Konrad

Community Browser