Skip to content

Commit

Permalink
Change from services.AddAuthorization() to services.AddAuthorizationB…
Browse files Browse the repository at this point in the history
…uilder()
  • Loading branch information
mburumaxwell committed Jan 31, 2024
1 parent 4ac450d commit 4be2a47
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,12 @@ private async Task TestAsync(Func<InMemoryTestHarness, HttpClient, Task> execute
services.AddAuthentication()
.AddBasic<BasicUserValidationService>(AuthConstants.SchemeNameServiceHooks, options => options.Realm = "Dependabot");

services.AddAuthorization(options =>
{
options.AddPolicy(AuthConstants.PolicyNameServiceHooks, policy =>
{
policy.AddAuthenticationSchemes(AuthConstants.SchemeNameServiceHooks)
.RequireAuthenticatedUser();
});
});
services.AddAuthorizationBuilder()
.AddPolicy(AuthConstants.PolicyNameServiceHooks, policy =>
{
policy.AddAuthenticationSchemes(AuthConstants.SchemeNameServiceHooks)
.RequireAuthenticatedUser();
});

services.AddEventBus(builder => builder.AddInMemoryTransport().AddInMemoryTestHarness());
})
Expand Down

0 comments on commit 4be2a47

Please sign in to comment.