public async Task AuthorizeOrgAccessToEventForUserNotAuthorized() { PepWithPDPAuthorizationMockSI pdp = new PepWithPDPAuthorizationMockSI(); AuthorizationHelper authzHelper = new AuthorizationHelper(pdp); CloudEvent cloudEvent = new CloudEvent() { Source = new Uri("https://skd.apps.altinn.no/ttd/endring-av-navn-v2/instances/1337/6fb3f738-6800-4f29-9f3e-1c66862656cd"), Subject = "/party/1337" }; // Act bool result = await authzHelper.AuthorizeConsumerForAltinnAppEvent(cloudEvent, "/org/nav"); // Assert. Assert.False(result); }
public AuthorizeInstancesHelperTest() { IPDP pdp = new PepWithPDPAuthorizationMockSI(_instanceRepository.Object); _authzHelper = new AuthorizationHelper(pdp, Mock.Of <ILogger <AuthorizationHelper> >()); }