Skip to content

Commit

Permalink
Add [Authorize] attribute on AuthorizationController.GetCurrentParty (#…
Browse files Browse the repository at this point in the history
…339)

This means that the code won't crash with missing cookie when the cookie
exipires
  • Loading branch information
ivarne authored Nov 15, 2023
1 parent f8ca8a3 commit 267c2ef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Altinn.App.Api/Controllers/AuthorizationController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public AuthorizationController(
/// Gets current party by reading cookie value and validating.
/// </summary>
/// <returns>Party id for selected party. If invalid, partyId for logged in user is returned.</returns>
[Authorize]
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
[HttpGet("{org}/{app}/api/authorization/parties/current")]
public async Task<ActionResult> GetCurrentParty(bool returnPartyObject = false)
Expand Down

0 comments on commit 267c2ef

Please sign in to comment.