Carter icon indicating copy to clipboard operation
Carter copied to clipboard

Example on how to use role based identity in unit-tests

Open danielmoncada opened this issue 6 years ago • 0 comments

Hello,

Current set of unit-tests for security appear to be around claims. Would like to see a sample surrounding 'role' based identification.

Current policy is set up as (with my UTs returning a 500 unauthorized)

      services.AddAuthorization(options =>
      {
           options.AddPolicy("LoggedIn", policy => policy.RequireRole(loggedInRoles));
      });

danielmoncada avatar Jan 31 '20 23:01 danielmoncada