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
using Microsoft.AspNetCore.Authorization; | |
using Microsoft.AspNetCore.Mvc.Authorization; | |
using Microsoft.Identity.Web; | |
using Microsoft.Identity.Web.UI; | |
var builder = WebApplication.CreateBuilder(args); | |
IEnumerable<string>? initialScopes = builder.Configuration["DownstreamApi:Scopes"]?.Split(' '); | |
builder.Services.AddMicrosoftIdentityWebAppAuthentication(builder.Configuration, "AzureAd") | |
.EnableTokenAcquisitionToCallDownstreamApi(initialScopes) |
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
# https://hub.docker.com/_/microsoft-dotnet | |
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build | |
WORKDIR /app | |
EXPOSE 80 | |
EXPOSE 443 | |
# copy csproj and restore as distinct layers | |
COPY ComplexApp.Core/*.csproj ComplexApp.Core/ | |
COPY ComplexApp.Web/*.csproj ComplexApp.Web/ | |
RUN dotnet restore ComplexApp.Web |
OlderNewer