Skip to content

Commit

Permalink
Change Auth - so it works for external api calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinJump committed Dec 6, 2024
1 parent 6a159b4 commit 9edbf63
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions uSync.BackOffice/uSyncBackOfficeBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

using OpenIddict.Validation.AspNetCore;

using System;
using System.Linq;

Expand Down Expand Up @@ -246,8 +248,8 @@ private static void CreatePolicies(AuthorizationOptions options,
{
options.AddPolicy(SyncAuthorizationPolicies.TreeAccessuSync, policy =>
{
policy.AuthenticationSchemes.Add(backOfficeAuthScheme);
policy.Requirements.Add(new uSyncApplicationRequirement(Constants.Applications.Settings));
policy.AuthenticationSchemes.Add(OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme);
policy.Requirements.Add(new uSyncApplicationRequirement(Constants.Applications.Settings));
});
}
}

0 comments on commit 9edbf63

Please sign in to comment.