Skip to content

Commit

Permalink
Merge branch 'main' into chore/sql-script-generator-for-yt01
Browse files Browse the repository at this point in the history
  • Loading branch information
oskogstad authored Jan 9, 2025
2 parents 59f8bf5 + 37e545a commit 08337d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Microsoft.IdentityModel.Tokens;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using System.Diagnostics;
using System.IdentityModel.Tokens.Jwt;

namespace Digdir.Domain.Dialogporten.GraphQL.Common.Authentication;

Expand All @@ -22,6 +23,10 @@ public static IServiceCollection AddDialogportenAuthentication(

services.AddSingleton<ITokenIssuerCache, TokenIssuerCache>();

// Turn off mapping InboundClaims names to its longer version
// "acr" => "http://schemas.microsoft.com/claims/authnclassreference"
JwtSecurityTokenHandler.DefaultMapInboundClaims = false;

var authenticationBuilder = services.AddAuthentication();

foreach (var schema in jwtTokenSchemas)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Microsoft.IdentityModel.Tokens;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using System.Diagnostics;
using System.IdentityModel.Tokens.Jwt;

namespace Digdir.Domain.Dialogporten.WebApi.Common.Authentication;

Expand All @@ -24,6 +25,10 @@ public static IServiceCollection AddDialogportenAuthentication(

services.AddSingleton<ITokenIssuerCache, TokenIssuerCache>();

// Turn off mapping InboundClaims names to its longer version
// "acr" => "http://schemas.microsoft.com/claims/authnclassreference"
JwtSecurityTokenHandler.DefaultMapInboundClaims = false;

var authenticationBuilder = services.AddAuthentication();

foreach (var schema in jwtTokenSchemas)
Expand Down

0 comments on commit 08337d2

Please sign in to comment.