예제 #1
0
        public static string GetStringToSignForNephosSharedKeyLiteAuth(RequestContext requestContext, NephosUriComponents uriComponents)
        {
            Uri           requestUrl            = requestContext.RequestUrl;
            StringBuilder stringBuilder         = new StringBuilder(MessageCanonicalizer.GetNephosOrStandardDateString(requestContext.RequestHeaders));
            string        canonicalizedResource = MessageCanonicalizer.GetCanonicalizedResource(requestUrl, uriComponents, requestContext.RequestRawUrlString);

            TableAuthenticationHelper.AppendStringToCanonicalizedString(stringBuilder, canonicalizedResource);
            return(stringBuilder.ToString());
        }
예제 #2
0
        public static string CanonicalizeTableHttpRequestForSharedKeyAuth(Uri address, NephosUriComponents uriComponents, string method, string contentType, NameValueCollection headers, string rawUrl)
        {
            StringBuilder stringBuilder = new StringBuilder(method);

            TableAuthenticationHelper.AppendStringToCanonicalizedString(stringBuilder, MessageCanonicalizer.GetContentMD5(headers));
            TableAuthenticationHelper.AppendStringToCanonicalizedString(stringBuilder, contentType);
            TableAuthenticationHelper.AppendStringToCanonicalizedString(stringBuilder, MessageCanonicalizer.GetNephosOrStandardDateString(headers));
            TableAuthenticationHelper.AppendStringToCanonicalizedString(stringBuilder, MessageCanonicalizer.GetCanonicalizedResource(address, uriComponents, rawUrl));
            return(stringBuilder.ToString());
        }