microsoft/healthcare-shared-components
Publicmirrored from https://github.com/microsoft/healthcare-shared-componentsAvailable
src/Microsoft.Health.Client/Authentication/ManagedIdentityCredentialOptions.cs
41lines · modecode
| 1 | // ------------------------------------------------------------------------------------------------- |
| 2 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 3 | // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. |
| 4 | // ------------------------------------------------------------------------------------------------- |
| 5 | |
| 6 | using EnsureThat; |
| 7 | |
| 8 | namespace Microsoft.Health.Client.Authentication; |
| 9 | |
| 10 | public class ManagedIdentityCredentialOptions |
| 11 | { |
| 12 | public ManagedIdentityCredentialOptions() |
| 13 | { |
| 14 | } |
| 15 | |
| 16 | public ManagedIdentityCredentialOptions(string resource, string tenantId) |
| 17 | { |
| 18 | EnsureArg.IsNotNullOrWhiteSpace(resource, nameof(resource)); |
| 19 | EnsureArg.IsNotNullOrWhiteSpace(tenantId, nameof(tenantId)); |
| 20 | |
| 21 | Resource = resource; |
| 22 | TenantId = tenantId; |
| 23 | } |
| 24 | |
| 25 | public ManagedIdentityCredentialOptions(string resource, string tenantId, string clientId) |
| 26 | { |
| 27 | EnsureArg.IsNotNullOrWhiteSpace(resource, nameof(resource)); |
| 28 | EnsureArg.IsNotNullOrWhiteSpace(tenantId, nameof(tenantId)); |
| 29 | EnsureArg.IsNotNullOrWhiteSpace(clientId, nameof(clientId)); |
| 30 | |
| 31 | Resource = resource; |
| 32 | TenantId = tenantId; |
| 33 | ClientId = clientId; |
| 34 | } |
| 35 | |
| 36 | public string Resource { get; set; } |
| 37 | |
| 38 | public string TenantId { get; set; } |
| 39 | |
| 40 | public string ClientId { get; set; } |
| 41 | } |
| 42 | |