Skip to content

Commit

Permalink
Remove AD authentication because the package reference conflicts with…
Browse files Browse the repository at this point in the history
… other projects.
  • Loading branch information
sjuarezgx committed Jul 20, 2023
1 parent 74ceb51 commit 44b75a6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Text.Json;
using System.Threading.Tasks;
using Azure;
using Azure.Identity;
using Azure.Messaging;
using Azure.Messaging.EventGrid;
using GeneXus.Messaging.Common;
Expand Down Expand Up @@ -32,15 +31,18 @@ private void Initialize(GXService providerService)
_endpoint = serviceSettings.GetEncryptedPropertyValue(PropertyConstants.URI_ENDPOINT);
_accessKey = serviceSettings.GetEncryptedPropertyValue(PropertyConstants.ACCESS_KEY);

//Package Azure.Identity cannot be referenced because it conflicts with Microsoft.Identity.Client pack version
//used transitively by gxmail and dynamoDB projects.

/*if (string.IsNullOrEmpty(_accessKey))
//Try using Active Directory authentication
_client = new EventGridPublisherClient(
new Uri(_endpoint),
new DefaultAzureCredential());*/


if (!string.IsNullOrEmpty(_endpoint)) {
if (string.IsNullOrEmpty(_accessKey))

//Try using Active Directory authentication
_client = new EventGridPublisherClient(
new Uri(_endpoint),
new DefaultAzureCredential());

else

_client = new EventGridPublisherClient(
new Uri(_endpoint),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public EventRouterProviderBase Connect(string endpoint, string accesskey, out GX
success = successConnect;
return evtRouterProvider;
}
public EventRouterProviderBase Connect(string endpoint, out GXBaseCollection<SdtMessages_Message> errorMessages, out bool success)
/*public EventRouterProviderBase Connect(string endpoint, out GXBaseCollection<SdtMessages_Message> errorMessages, out bool success)
{
EventRouterProvider eventRouterProvider = new EventRouterProvider();
GXProperties properties = new GXProperties
Expand All @@ -34,6 +34,6 @@ public EventRouterProviderBase Connect(string endpoint, out GXBaseCollection<Sdt
errorMessages = errorMessagesConnect;
success = successConnect;
return evtRouterProvider;
}
}*/
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.9.0" />
<PackageReference Include="Azure.Messaging.EventGrid" Version="4.17.0" />
</ItemGroup>

Expand Down

0 comments on commit 44b75a6

Please sign in to comment.