Skip to content

Commit

Permalink
Add todo for #386
Browse files Browse the repository at this point in the history
  • Loading branch information
oskogstad committed Jun 5, 2024
1 parent 5db8ed8 commit bd59d04
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ public static (UserIdType, string externalId) GetUserType(this ClaimsPrincipal c
{
if (claimsPrincipal.TryGetPid(out var externalId))
{
// ServiceOwnerOnHelfOfPerson does not work atm., since there will be no PID claim on service owner calls
// TODO: This needs to be fixed when implementing https://github.com/digdir/dialogporten/issues/386
// F.ex. a middleware that runs before UserTypeValidationMiddleware that adds the PID claim
return (claimsPrincipal.HasScope(ServiceProviderScope)
? UserIdType.ServiceOwnerOnBehalfOfPerson
: UserIdType.Person, externalId);
Expand Down

0 comments on commit bd59d04

Please sign in to comment.