Example #1
0
        // TODO - add test
        private bool IsValidCall(string encodedJwtPrivateKey)
        {
            string decodedJwtPrivateKey = this.stringHelper.DecodeBase64String(encodedJwtPrivateKey);

            var expectedJwtPrivateKey = EnvironmentalConfig.GetJwtPrivateKey();

            return(expectedJwtPrivateKey == decodedJwtPrivateKey);
        }
Example #2
0
        public string GetJwtPrivateKey()
        {
            // TODO - re test this after .net core 3 is installed
            //RSA rsa = new RSACryptoServiceProvider(2048); // Generate a new 2048 bit RSA key
            //string key = rsa.ToXmlString(true);

            //NOTE: Temporary key generated from NetClassicUtility...replace when .net core has
            //      same functionality as .Net Classic
            string key = EnvironmentalConfig.GetJwtPrivateKey();

            return(key);
        }
Example #3
0
 private void EndPoint_UserDelete(string host, string userName, bool onlyDeleteBucketListItems = false)
 {
     var url        = host + "api/TgimbaApi/deleteuserbucketlistitems/" + userName + "/" + onlyDeleteBucketListItems.ToString();
     var privateKey = EnvironmentalConfig.GetJwtPrivateKey();
     var result     = Delete(url, Base64Encode(userName), Base64Encode(privateKey)).Result;
 }