Skip to content

Commit

Permalink
chore(app): Temp. disable authorized parties cache (#1512)
Browse files Browse the repository at this point in the history
<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->

## Related Issue(s)

- #1226 

## Verification

- [ ] **Your** code builds clean without any errors or warnings
- [ ] Manual testing done (required)
- [ ] Relevant automated test added (if you find this hard, leave it and
we'll help out)

## Documentation

- [ ] Documentation is updated (either in `docs`-directory, Altinnpedia
or a separate linked PR in
[altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if
applicable)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Resolved issues with the caching mechanism for retrieving authorized
parties, now using direct requests to improve reliability.
- **Improvements**
- Enhanced clarity in the claims retrieval process for authorized
resources.
- Maintained robust error handling to ensure integrity in the
authorization process.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
oskogstad authored Nov 22, 2024
1 parent 5478275 commit a87b3e1
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,12 @@ public async Task<AuthorizedPartiesResult> GetAuthorizedParties(IPartyIdentifier
CancellationToken cancellationToken = default)
{
var authorizedPartiesRequest = new AuthorizedPartiesRequest(authenticatedParty);
var authorizedParties = await _partiesCache.GetOrSetAsync(authorizedPartiesRequest.GenerateCacheKey(), async token
=> await PerformAuthorizedPartiesRequest(authorizedPartiesRequest, token), token: cancellationToken);

// Disabled until this bug is fixed: https://github.com/digdir/dialogporten/issues/1226
// var authorizedParties = await _partiesCache.GetOrSetAsync(authorizedPartiesRequest.GenerateCacheKey(), async token
// => await PerformAuthorizedPartiesRequest(authorizedPartiesRequest, token), token: cancellationToken);

var authorizedParties = await PerformAuthorizedPartiesRequest(authorizedPartiesRequest, cancellationToken);

return flatten ? GetFlattenedAuthorizedParties(authorizedParties) : authorizedParties;
}
Expand Down

0 comments on commit a87b3e1

Please sign in to comment.