| | | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 2 | | // Licensed under the MIT License. |
| | | 3 | | |
| | | 4 | | using System; |
| | | 5 | | using System.Collections.Generic; |
| | | 6 | | using System.Text; |
| | | 7 | | |
| | | 8 | | namespace Azure.Messaging.EventGrid |
| | | 9 | | { |
| | | 10 | | /// <summary> |
| | | 11 | | /// SAS token used to authenticate to the Event Grid service. |
| | | 12 | | /// </summary> |
| | | 13 | | public class EventGridSharedAccessSignatureCredential |
| | | 14 | | { |
| | | 15 | | /// <summary> |
| | | 16 | | /// Initializes a new instance of the <see cref="EventGridSharedAccessSignatureCredential"/> class. |
| | | 17 | | /// </summary> |
| | | 18 | | /// <param name="signature">SAS token used for authentication</param> |
| | 4 | 19 | | public EventGridSharedAccessSignatureCredential(string signature) |
| | | 20 | | { |
| | 4 | 21 | | Signature = signature; |
| | 4 | 22 | | } |
| | | 23 | | /// <summary> |
| | | 24 | | /// SAS token used to authenticate to the Event Grid service. |
| | | 25 | | /// </summary> |
| | 8 | 26 | | public string Signature { get; private set; } |
| | | 27 | | |
| | | 28 | | /// <summary> |
| | | 29 | | /// Updates the SAS token. This is intended to be used when you've regenerated the token and want to update long |
| | | 30 | | /// </summary> |
| | | 31 | | /// <param name="signature">SAS token used for authentication</param> |
| | | 32 | | public void Update(string signature) |
| | | 33 | | { |
| | 0 | 34 | | Signature = signature; |
| | 0 | 35 | | } |
| | | 36 | | } |
| | | 37 | | } |