diff --git a/samples/ChatRoom/Program.cs b/samples/ChatRoom/Program.cs index 46fab620..a6d76530 100644 --- a/samples/ChatRoom/Program.cs +++ b/samples/ChatRoom/Program.cs @@ -1,5 +1,27 @@ -var builder = WebApplication.CreateBuilder(args); -builder.Services.AddSignalR().AddAzureSignalR(); +using Azure.Identity; + +using Microsoft.Azure.SignalR; + +var builder = WebApplication.CreateBuilder(args); +builder.Services.AddSignalR().AddAzureSignalR(option => +{ + // Here are sample codes for sovereign clouds + // + // var credentialOptions = new ClientSecretCredentialOptions() + // { + // AuthorityHost = AzureAuthorityHosts.AzurePublicCloud, + // // AuthorityHost = AzureAuthorityHosts.AzureGovernment, // for fairfax region + // // AuthorityHost = AzureAuthorityHosts.AzureChina, // for mooncake region + // }; + + // var tenantId = ""; + // var clientId = ""; + // var clientSecret = ""; + + // option.Endpoints = new ServiceEndpoint[] { + // new(new Uri("https://"), new ClientSecretCredential(tenantId, clientId, clientSecret, credentialOptions)) + // }; +}); var app = builder.Build(); app.UseHttpsRedirection();