Skip to content

Commit

Permalink
sample (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
terencefan authored Jul 26, 2024
1 parent b1b6fae commit 7780263
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions samples/ChatRoom/Program.cs
Original file line number Diff line number Diff line change
@@ -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://<hostname>"), new ClientSecretCredential(tenantId, clientId, clientSecret, credentialOptions))
// };
});
var app = builder.Build();

app.UseHttpsRedirection();
Expand Down

0 comments on commit 7780263

Please sign in to comment.