Beispiel #1
0
 public static void AddServiceBusSupplementaryAuthorizationHeader(this WebClient request, SharedAccessSignatureTokenProvider tokenProvider, string address)
 {
     if (tokenProvider != null)
     {
         string messagingWebToken = tokenProvider.BuildSignature(address); //tokenProvider.GetMessagingWebToken(namespaceAddress, request.RequestUri.AbsoluteUri, action, false, Constants.TokenRequestOperationTimeout);
         request.Headers["ServiceBusSupplementaryAuthorization"] = messagingWebToken;
     }
 }
Beispiel #2
0
 public static void AddAuthorizationHeader(this WebClient request, SharedAccessSignatureTokenProvider tokenProvider, string address)
 {
     if (tokenProvider != null)
     {
         string messagingWebToken = tokenProvider.BuildSignature(address);
         request.Headers[HttpRequestHeader.Authorization] = messagingWebToken;
     }
 }