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
{ | |
"AzureAd": { | |
"Instance": "https://login.microsoftonline.com/", | |
"TenantId": "da41245a5-11b3-996c-00a8-4d99re19f292", | |
"ClientId": "5a886671-26ae-4844-84d8-19cb3e1cfbb5", | |
"CallbackPath": "/signin-oidc", | |
"SignedOutCallbackPath ": "/signout-callback-oidc", | |
"ClientSecret": "6.91Wh3e--aeStjS-834SyEL6.Yc4=b=" | |
}, | |
"Logging": { |
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 Startup | |
{ | |
public Startup(IConfiguration configuration) | |
{ | |
Configuration = configuration; | |
} | |
public IConfiguration Configuration { get; } | |
public void ConfigureServices(IServiceCollection services) |
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
@{ | |
ViewData["Title"] = "Home Page"; | |
} | |
@using WebAPI; | |
@model List<WeatherForecast> | |
<div class="text-center"> | |
<h1 class="display-4">Welcome</h1> | |
<p> |
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 HomeController : Controller | |
{ | |
private readonly ILogger<HomeController> _logger; | |
private readonly ITokenAcquisition _tokenAcquisition; | |
public HomeController(ILogger<HomeController> logger, ITokenAcquisition tokenAcquisition) | |
{ | |
_logger = logger; | |
_tokenAcquisition = tokenAcquisition; | |
} |
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
app.UseCors(builder => | |
{ | |
builder.WithOrigins("http://localhost:4200") | |
.AllowCredentials() | |
.AllowAnyMethod() | |
.AllowAnyHeader(); | |
}); |
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
import { Component, OnInit } from '@angular/core'; | |
import { AuthService } from './auth.service'; | |
import { HttpClient } from '@angular/common/http'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'] | |
}) | |
export class AppComponent implements OnInit { |
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
import { BrowserModule } from '@angular/platform-browser'; | |
import { NgModule } from '@angular/core'; | |
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http'; | |
import { MsalModule, MsalInterceptor } from '@azure/msal-angular'; | |
import { AppRoutingModule } from './app-routing.module'; | |
import { AppComponent } from './app.component'; | |
import { HomeComponent } from './home/home.component'; | |
import { AuthService } from './auth.service'; |
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 Startup | |
{ | |
public Startup(IConfiguration configuration) | |
{ | |
Configuration = configuration; | |
} | |
public IConfiguration Configuration { get; } | |
public void ConfigureServices(IServiceCollection services) |
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 Startup | |
{ | |
public Startup(IConfiguration configuration) | |
{ | |
Configuration = configuration; | |
} | |
public IConfiguration Configuration { get; } | |
public void ConfigureServices(IServiceCollection services) |
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
{ | |
"AzureAdB2C": { | |
"Instance": "https://samplead.b2clogin.com/tfp/", | |
"ClientId": "33ea9cee-4b1e-42ce-a9db-33d06447759b", | |
"Domain": "samplead.onmicrosoft.com", | |
"SignUpSignInPolicyId": "B2C_1_SignUpSignIn " | |
}, | |
"Logging": { | |
"LogLevel": { | |
"Default": "Information", |