Esempio n. 1
0
        public static void SignRequest(HttpWebRequest request, FileContext context)
        {
            Assert.IsNotNull(request);
            Assert.IsNotNull(context);

            OperationContext opContext             = new OperationContext();
            SharedKeyAuthenticationHandler handler = new SharedKeyAuthenticationHandler(
                SharedKeyCanonicalizer.Instance,
                context.Credentials,
                context.Account);

            handler.SignRequest(request, opContext);

            FileTestUtils.AuthorizationHeader(request, true, context.Account);
            FileTestUtils.DateHeader(request, true);
        }