How can I bypass RequiredScopeOrAppPermission
in integration tests?
#1871
-
Thew official ASPNET Core Integration Testing guide has a section on mocking auth here https://docs.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-6.0#mock-authentication This shows adding a new default auth handler that just logs in a hardcoded user. However, because Is there some way to also un-register the service that checks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In my case, manually adding the Role claim to my user worked: new Claim(ClaimConstants.Roles, "DaemonAppRole") Would still love to hear other ideas. |
Beta Was this translation helpful? Give feedback.
In my case, manually adding the Role claim to my user worked:
Would still love to hear other ideas.