File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public void ConfigureServices(IServiceCollection services)
40
40
// By default, the claims mapping will map claim names in the old format to accommodate older SAML applications.
41
41
// 'http://schemas.microsoft.com/ws/2008/06/identity/claims/role' instead of 'roles'
42
42
// This flag ensures that the ClaimsIdentity claims collection will be built from the claims in the token
43
- JwtSecurityTokenHandler . DefaultMapInboundClaims = false ;
43
+ // JwtSecurityTokenHandler.DefaultMapInboundClaims = false;
44
44
45
45
// Token acquisition service based on MSAL.NET
46
46
// and chosen token cache implementation
Original file line number Diff line number Diff line change @@ -51,13 +51,10 @@ public void ConfigureServices(IServiceCollection services)
51
51
// By default, the claims mapping will map claim names in the old format to accommodate older SAML applications.
52
52
// 'http://schemas.microsoft.com/ws/2008/06/identity/claims/role' instead of 'roles'
53
53
// This flag ensures that the ClaimsIdentity claims collection will be built from the claims in the token
54
- JwtSecurityTokenHandler . DefaultMapInboundClaims = false ;
54
+ // JwtSecurityTokenHandler.DefaultMapInboundClaims = false;
55
55
56
- services . AddProtectedWebApi ( Configuration ) ;
57
- services . Configure < JwtBearerOptions > ( AzureADDefaults . JwtBearerAuthenticationScheme , options =>
58
- {
59
- options . TokenValidationParameters . NameClaimType = "name" ;
60
- } ) ;
56
+ services . AddProtectedWebApi ( Configuration )
57
+ . AddInMemoryTokenCaches ( ) ;
61
58
62
59
services . AddMvc ( ) . SetCompatibilityVersion ( CompatibilityVersion . Version_2_2 ) ;
63
60
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public static IServiceCollection AddProtectedWebApi(
41
41
string configSectionName = "AzureAD" ,
42
42
bool subscribeToJwtBearerMiddlewareDiagnosticsEvents = false )
43
43
{
44
- services . Configure < AzureADOptions > ( options => configuration . Bind ( configSectionName , options ) ) ;
44
+ // services.Configure<AzureADOptions>(options => configuration.Bind(configSectionName, options));
45
45
services . AddAuthentication ( AzureADDefaults . JwtBearerAuthenticationScheme )
46
46
. AddAzureADBearer ( options => configuration . Bind ( configSectionName , options ) ) ;
47
47
You can’t perform that action at this time.
0 commit comments