Skip to content

Instantly share code, notes, and snippets.

View RyanHill-MSFT's full-sized avatar

Ryan Hill RyanHill-MSFT

View GitHub Profile
1. settings.json is configured so that VS Code can configure the functions host environment
{
"azureFunctions.deploySubpath": ".",
"azureFunctions.scmDoBuildDuringDeployment": true,
"azureFunctions.pythonVenv": ".venv",
"azureFunctions.projectLanguage": "Python",
"azureFunctions.projectRuntime": "~3",
"debug.internalConsoleOptions": "neverOpen"
}
services.AddIdentityServer(options => options.IssuerUri = "your expected issuer uri");
// ensure the issuer matches in the JWT bearer token
services.Configure<JwtBearerOptions>("YourProjectNameAPI",
options => options.TokenValidationOptions.ValidIssuer = "your expected issuer uri");
@RyanHill-MSFT
RyanHill-MSFT / Program.cs
Created June 23, 2020 03:11
Webjobs SDK using ConfigureServices
class Program
{
private static IConfiguration Configuration { get; set; }
static async Task Main()
{
var builder = new HostBuilder();
builder.ConfigureWebJobs(b =>
{
b.AddAzureStorageCoreServices()
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster as build
WORKDIR /src
COPY *.csproj .
RUN dotnet restore "./webapp-basic-netcore.csproj"
COPY . .
<!DOCTYPE html>
<html>
<head>
<title>Quickstart for MSAL JS</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js"></script>
<script src="https://secure.aadcdn.microsoftonline-p.com/lib/0.2.3/js/msal.js"></script>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
</head>