Skip to content

Commit

Permalink
???
Browse files Browse the repository at this point in the history
  • Loading branch information
oskogstad committed Nov 25, 2024
1 parent a0b43c5 commit 49c6593
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Diagnostics;
using System.Reflection;
using System.Text.Json;
using System.Text.Json.Serialization;
using Altinn.Authorization.ABAC.Xacml.JsonProfile;
Expand Down Expand Up @@ -90,9 +91,22 @@ public async Task<AuthorizedPartiesResult> GetAuthorizedParties(IPartyIdentifier
var authorizedParties = await _partiesCache.GetOrSetAsync(cacheKey, async token
=> await PerformAuthorizedPartiesRequest(authorizedPartiesRequest, token), token: cancellationToken);

<<<<<<< HEAD

Check failure on line 94 in src/Digdir.Domain.Dialogporten.Infrastructure/Altinn/Authorization/AltinnAuthorizationClient.cs

View workflow job for this annotation

GitHub Actions / build / build-and-test

Merge conflict marker encountered

Check failure on line 94 in src/Digdir.Domain.Dialogporten.Infrastructure/Altinn/Authorization/AltinnAuthorizationClient.cs

View workflow job for this annotation

GitHub Actions / build / build-and-test

Merge conflict marker encountered
var mcaField = typeof(FusionCache).GetField("_mca", BindingFlags.NonPublic | BindingFlags.Instance);
var mcaValue = mcaField?.GetValue(_partiesCache);
var mcField = mcaValue!.GetType().GetField("_cache", BindingFlags.NonPublic | BindingFlags.Instance);
var mcValue = mcField?.GetValue(mcaValue) as IMemoryCache;

var inMemoryCacheValue = mcValue!.TryGetValue(cacheKey, out var inMemoryCacheEntry);
var inMemoryCacheEntryValue = inMemoryCacheEntry?.GetType().GetProperty("Value")?.GetValue(inMemoryCacheEntry);

_logger.LogInformation("In memory cache value for {CacheKey}, success: {InMemoryCacheValue} value: {@inMemoryCacheEntryValue}",
cacheKey, inMemoryCacheValue, inMemoryCacheEntryValue);
=======

Check failure on line 105 in src/Digdir.Domain.Dialogporten.Infrastructure/Altinn/Authorization/AltinnAuthorizationClient.cs

View workflow job for this annotation

GitHub Actions / build / build-and-test

Merge conflict marker encountered

Check failure on line 105 in src/Digdir.Domain.Dialogporten.Infrastructure/Altinn/Authorization/AltinnAuthorizationClient.cs

View workflow job for this annotation

GitHub Actions / build / build-and-test

Merge conflict marker encountered
var inMemoryCacheValue = _inMemoryCache.TryGetValue<AuthorizedPartiesResult>(cacheKey, out var inMemoryCacheEntry);
_logger.LogInformation("In memory cache value for {CacheKey}, success: {InMemoryCacheValue} value: {@InMemoryCacheEntry}",
cacheKey, inMemoryCacheValue, inMemoryCacheEntry);
>>>>>>> main

Check failure on line 109 in src/Digdir.Domain.Dialogporten.Infrastructure/Altinn/Authorization/AltinnAuthorizationClient.cs

View workflow job for this annotation

GitHub Actions / build / build-and-test

Merge conflict marker encountered

Check failure on line 109 in src/Digdir.Domain.Dialogporten.Infrastructure/Altinn/Authorization/AltinnAuthorizationClient.cs

View workflow job for this annotation

GitHub Actions / build / build-and-test

Merge conflict marker encountered

// Temporary logging to debug missing authorized sub parties
_logger.LogInformation("Authorized parties for {Party}: {@AuthorizedParties}", authenticatedParty, authorizedParties);
Expand Down

0 comments on commit 49c6593

Please sign in to comment.