You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
I was attempting to implement something like the DynamicPolicyProvider in your unit tests where the idea is that you can specify the policy name at runtime and built it on the fly. While this passes your unit tests, if you try to actually declare something like [Authorize("MyPolicy")] on an action/controller you get an exception that states
InvalidOperationException: The AuthorizationPolicy named: 'MyPolicy' was not found.
Is this by design, and if so, what am I missing? I assume this happens because the policy isn't declared at runtime, but how is that compatible with the idea of building it at runtime?