File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
App/backend-api/Microsoft.GS.DPS.Host/Helpers Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,15 @@ public static class AzureCredentialHelper
99 {
1010 public static TokenCredential GetAzureCredential ( string clientId = null )
1111 {
12+ """
13+ Returns an Azure credential based on the application environment.
14+ If the environment is 'dev', it uses DefaultAzureCredential.
15+ Otherwise, it uses ManagedIdentityCredential.
16+ Args:
17+ client_id (str, optional): The client ID for the Managed Identity Credential.
18+ Returns:
19+ Credential object: Either DefaultAzureCredential or ManagedIdentityCredential.
20+ """
1221 var env = Environment. GetEnvironmentVariable ( "ASPNETCORE_ENVIRONMENT" ) ?? "Production" ;
1322
1423 if ( string . Equals ( env , "Development" , StringComparison . OrdinalIgnoreCase ) )
You can’t perform that action at this time.
0 commit comments