-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify managed identity configuration (#113)
Reducing complexity of managed identity implementation.
- Loading branch information
1 parent
bc31b40
commit ab34832
Showing
7 changed files
with
51 additions
and
115 deletions.
There are no files selected for viewing
41 changes: 0 additions & 41 deletions
41
src/Microsoft.Identity.Abstractions/ManagedIdentity/ManagedIdentityOptions.cs
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
src/Microsoft.Identity.Abstractions/ManagedIdentity/ManagedIdentityType.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/Microsoft.Identity.Abstractions/TokenAcquisition/ManagedIdentityOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System.ComponentModel; | ||
|
||
namespace Microsoft.Identity.Abstractions | ||
{ | ||
/// <summary> | ||
/// Data object to hold the definition of a managed identity for an application to use for authentication. If | ||
/// <see cref="UserAssignedClientId"/> is null, the application will use the system-assigned managed identity. If | ||
/// <see cref="UserAssignedClientId"/> is set, the application will try to use the user-assigned managed identity associated | ||
/// with the provided ClientID. See <see href="https://aka.ms/Entra/ManagedIdentityOverview"/> for more details. | ||
/// </summary> | ||
public class ManagedIdentityOptions | ||
{ | ||
/// <summary> | ||
/// Gets or sets the value of the ClientID for user-assigned managed identity. If not set, the default value is null | ||
/// which will tell the application to use the system-assigned managed identity. | ||
/// </summary> | ||
[DefaultValue(null)] | ||
public string? UserAssignedClientId { get; set; } | ||
|
||
/// <summary> | ||
/// Makes a new object to avoid sharing the same reference. | ||
/// </summary> | ||
/// <returns> | ||
/// New instance of <see cref="ManagedIdentityOptions"/> with the same <see cref="UserAssignedClientId"/>. | ||
/// </returns> | ||
public ManagedIdentityOptions Clone() | ||
{ | ||
return new ManagedIdentityOptions | ||
{ | ||
UserAssignedClientId = UserAssignedClientId | ||
}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
test/Microsoft.Identity.Abstractions.Tests/ManagedIdentityDescriptionTests.cs
This file was deleted.
Oops, something went wrong.