View msal.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
// See https://aka.ms/new-console-template for more information | |
using Microsoft.Identity.Client; | |
var app = ConfidentialClientApplicationBuilder | |
.Create("a43255e1-24df-4b22-94e9-4e583e6301c3") | |
.WithClientSecret("RKP8Q~LKTGJKwzsItxnpIfIVG2XMAyPG1IhvIcpk") | |
.WithAuthority(new Uri("https://login.microsoftonline.com/81699cc3-1e16-40c8-afb9-5b4e2aac2dca")) | |
.Build(); | |
var token = await app.AcquireTokenForClient(new[] |
View ping.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
#r "Newtonsoft.Json" | |
using System.Net; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Primitives; | |
using Newtonsoft.Json; | |
public static IActionResult Run(HttpRequest req, ILogger log) | |
{ | |
return new OkObjectResult("ping"); |
View client.json
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
{ | |
"snow_identifier": string, | |
"client_id": string, | |
"role_assignments": [ | |
{ | |
"backend_application_id": string, | |
"roles": [ string ] | |
} | |
] | |
} |
View api.json
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
{ | |
"snow_identifier": string, | |
"client_id": string (Guid), | |
"application_roles": [ | |
{ | |
"displayName": string, | |
"description": string, | |
"roleName": string | |
} | |
], |
View main.tf
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
terraform { | |
} | |
variable storage_account_resource_group_name { | |
type = string | |
} | |
variable storage_account_name { | |
type = string | |
} |
View main.tf
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
terraform { | |
} | |
variable storage_account_resource_group_name { | |
type = string | |
} | |
variable storage_account_name { | |
type = string | |
} |
View main.tf
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
terraform { | |
required_providers { | |
azurerm = { | |
source = "hashicorp/azurerm" | |
version = "=3.30.0" | |
} | |
} | |
} | |
provider "azurerm" { |
View objects-update.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
public async Task<IActionResult> Run( | |
[Redis(key: "values", valueType: RedisValueType.Collection, Connection = "RedisConnectionString")] ICollector<Person> values) | |
{ | |
values.Add(new Person { Id = "1", Name = "Name 1" }); | |
values.Add(new Person { Id = "1", Name = "Name 2" }); | |
} |
View person.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
public class Person : IRedisListItem | |
{ | |
public string Name { get; set; } | |
public string Id { get; set; } | |
} |
View objects-write.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
public async Task<IActionResult> Run( | |
[Redis(key: "values", valueType: RedisValueType.Collection, Connection = "RedisConnectionString")] ICollector<Person> values) | |
{ | |
values.Add(new Person { Name = "Name 1" }); | |
values.Add(new Person { Name = "Name 2" }); | |
} |
NewerOlder