| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | |
|
| | 5 | | namespace Azure.Core |
| | 6 | | { |
| | 7 | | /// <summary> |
| | 8 | | /// Contains the details of an authentication token request. |
| | 9 | | /// </summary> |
| | 10 | | public readonly struct TokenRequestContext |
| | 11 | | { |
| | 12 | | /// <summary> |
| | 13 | | /// Creates a new TokenRequest with the specified scopes. |
| | 14 | | /// </summary> |
| | 15 | | /// <param name="scopes">The scopes required for the token.</param> |
| | 16 | | /// <param name="parentRequestId">The <see cref="Request.ClientRequestId"/> of the request requiring a token for |
| | 17 | | public TokenRequestContext(string[] scopes, string? parentRequestId = default) |
| | 18 | | { |
| 124 | 19 | | Scopes = scopes; |
| 124 | 20 | | ParentRequestId = parentRequestId; |
| 124 | 21 | | } |
| | 22 | |
|
| | 23 | | /// <summary> |
| | 24 | | /// The scopes required for the token. |
| | 25 | | /// </summary> |
| 16 | 26 | | public string[] Scopes { get; } |
| | 27 | |
|
| | 28 | | /// <summary> |
| | 29 | | /// The <see cref="Request.ClientRequestId"/> of the request requiring a token for authentication, if applicable |
| | 30 | | /// </summary> |
| 0 | 31 | | public string? ParentRequestId { get; } |
| | 32 | | } |
| | 33 | | } |