Browse Source
Using `Volo.Abp.DistributedLocking.Abstractions`.
pull/12534/head
maliming
4 years ago
No known key found for this signature in database
GPG Key ID: 96224957E51C89E
5 changed files with
2 additions and
18 deletions
-
modules/openiddict/app/OpenIddict.Demo.Server/OpenIddict.Demo.Server.csproj
-
modules/openiddict/app/OpenIddict.Demo.Server/OpenIddictServerModule.cs
-
modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo.Abp.OpenIddict.Domain.csproj
-
modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/AbpOpenIddictDomainModule.cs
-
modules/openiddict/test/Volo.Abp.OpenIddict.TestBase/OpenIddictTestBaseModule.cs
|
|
|
@ -67,7 +67,6 @@ |
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="OpenIddict.Validation.AspNetCore" Version="3.1.1" /> |
|
|
|
<PackageReference Include="OpenIddict.Validation.ServerIntegration" Version="3.1.1" /> |
|
|
|
<PackageReference Include="DistributedLock.Redis" Version="1.0.1" /> |
|
|
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.3" /> |
|
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0"> |
|
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> |
|
|
|
|
|
|
|
@ -1,12 +1,7 @@ |
|
|
|
using System.Text; |
|
|
|
using JetBrains.Annotations; |
|
|
|
using Medallion.Threading; |
|
|
|
using Medallion.Threading.Redis; |
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
using Microsoft.IdentityModel.Tokens; |
|
|
|
using OpenIddict.Demo.Server.EntityFrameworkCore; |
|
|
|
using OpenIddict.Validation.AspNetCore; |
|
|
|
using StackExchange.Redis; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.Account; |
|
|
|
using Volo.Abp.Account.Web; |
|
|
|
@ -112,12 +107,6 @@ public class OpenIddictServerModule : AbpModule |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
context.Services.AddSingleton<IDistributedLockProvider>(sp => |
|
|
|
{ |
|
|
|
var connection = ConnectionMultiplexer.Connect("127.0.0.1"); |
|
|
|
return new RedisDistributedSynchronizationProvider(connection.GetDatabase()); |
|
|
|
}); |
|
|
|
|
|
|
|
Configure<AbpOpenIddictAspNetCoreOptions>(options => |
|
|
|
{ |
|
|
|
options.AddDevelopmentEncryptionAndSigningCertificate = false; |
|
|
|
|
|
|
|
@ -11,7 +11,7 @@ |
|
|
|
<ItemGroup> |
|
|
|
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Ddd.Domain\Volo.Abp.Ddd.Domain.csproj" /> |
|
|
|
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Caching\Volo.Abp.Caching.csproj" /> |
|
|
|
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.DistributedLocking\Volo.Abp.DistributedLocking.csproj" /> |
|
|
|
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.DistributedLocking.Abstractions\Volo.Abp.DistributedLocking.Abstractions.csproj" /> |
|
|
|
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Domain\Volo.Abp.Identity.Domain.csproj" /> |
|
|
|
<ProjectReference Include="..\Volo.Abp.OpenIddict.Domain.Shared\Volo.Abp.OpenIddict.Domain.Shared.csproj" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
@ -22,7 +22,7 @@ namespace Volo.Abp.OpenIddict; |
|
|
|
typeof(AbpDddDomainModule), |
|
|
|
typeof(AbpIdentityDomainModule), |
|
|
|
typeof(AbpOpenIddictDomainSharedModule), |
|
|
|
typeof(AbpDistributedLockingModule), |
|
|
|
typeof(AbpDistributedLockingAbstractionsModule), |
|
|
|
typeof(AbpCachingModule), |
|
|
|
typeof(AbpGuidsModule) |
|
|
|
)] |
|
|
|
|
|
|
|
@ -1,9 +1,7 @@ |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Microsoft.Extensions.DependencyInjection.Extensions; |
|
|
|
using Volo.Abp.Authorization; |
|
|
|
using Volo.Abp.Autofac; |
|
|
|
using Volo.Abp.Data; |
|
|
|
using Volo.Abp.DistributedLocking; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Threading; |
|
|
|
|
|
|
|
@ -20,8 +18,6 @@ public class OpenIddictTestBaseModule : AbpModule |
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
context.Services.AddAlwaysAllowAuthorization(); |
|
|
|
|
|
|
|
context.Services.Replace(ServiceDescriptor.Singleton<IAbpDistributedLock, LocalAbpDistributedLock>()); |
|
|
|
} |
|
|
|
|
|
|
|
public override void OnApplicationInitialization(ApplicationInitializationContext context) |
|
|
|
|