Exemple #1
0
        /// <summary>
        /// Gets the public key.
        /// </summary>
        /// <returns></returns>
        public virtual ISitecorePublicKeyResponse GetPublicKey()
        {
            var query = new SitecoreActionQuery("getpublickey");

            ISitecorePublicKeyResponse response = GetResponse <SitecorePublicKeyResponse>(query);

            return(response.Validate() ? response : null);
        }
        /// <summary>
        /// Gets the public key.
        /// </summary>
        /// <returns></returns>
        public override ISitecorePublicKeyResponse GetPublicKey()
        {
            var query = new SitecoreActionQuery("getpublickey");

            // do not authenticate the call to get public key otherwise you will end up in an eternal loop
            // as the authentication routine itself calls GetPublicKey()

            ISitecorePublicKeyResponse response = new SitecoreDataContext(HostName).GetResponse <SitecorePublicKeyResponse>(query);

            return(response.Validate() ? response : null);
        }