When creating an Event Hub namespace instance, you had to choose a tier – you could choose between Basic and Standard tier. Besides features such as consumer groups or message retention, Standard tier offers one more thing—the ability to create event publishers. An event publisher acts as a virtual endpoint for sending messages to a hub. In fact, it enhances security by combining an SAS token with the identity of a sender. To generate a token, you have to use the following method:
public static string SharedAccessSignatureTokenProvider.GetSharedAccessSignature(string keyName, string sharedAccessKey, string resource, TimeSpan tokenTimeToLive)
To execute it correctly, you will need:
- Key name: the name of an SAS policy
- Shared ...