mirror of https://github.com/abpframework/abp.git
9 changed files with 19 additions and 63 deletions
@ -1,27 +0,0 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\..\configureawait.props" /> |
|||
<Import Project="..\..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>net8.0</TargetFramework> |
|||
<Nullable>enable</Nullable> |
|||
<WarningsAsErrors>Nullable</WarningsAsErrors> |
|||
<PackageId>Volo.Abp.AspNetCore.Authentication.JwtBearer.DynamicClaims</PackageId> |
|||
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> |
|||
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> |
|||
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute> |
|||
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute> |
|||
<RootNamespace /> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\Volo.Abp.AspNetCore.Authentication.JwtBearer\Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj" /> |
|||
<ProjectReference Include="..\Volo.Abp.Caching\Volo.Abp.Caching.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="IdentityModel" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -1,25 +0,0 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.Caching; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.Security.Claims; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Authentication.JwtBearer.DynamicClaims; |
|||
|
|||
[DependsOn( |
|||
typeof(AbpAspNetCoreAuthenticationJwtBearerModule), |
|||
typeof(AbpCachingModule) |
|||
)] |
|||
public class AbpAspNetCoreAuthenticationJwtBearerDynamicClaimsModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.AddHttpClient(); |
|||
context.Services.AddHttpContextAccessor(); |
|||
var abpClaimsPrincipalFactoryOptions = context.Services.ExecutePreConfiguredActions<AbpClaimsPrincipalFactoryOptions>(); |
|||
if (abpClaimsPrincipalFactoryOptions.IsRemoteRefreshEnabled) |
|||
{ |
|||
context.Services.AddTransient<WebRemoteDynamicClaimsPrincipalContributor>(); |
|||
context.Services.AddTransient<WebRemoteDynamicClaimsPrincipalContributorCache>(); |
|||
} |
|||
} |
|||
} |
|||
@ -1,10 +1,24 @@ |
|||
using Volo.Abp.Modularity; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.AspNetCore.Authentication.JwtBearer.DynamicClaims; |
|||
using Volo.Abp.Caching; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.Security; |
|||
using Volo.Abp.Security.Claims; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Authentication.JwtBearer; |
|||
|
|||
[DependsOn(typeof(AbpSecurityModule))] |
|||
[DependsOn(typeof(AbpSecurityModule), typeof(AbpCachingModule))] |
|||
public class AbpAspNetCoreAuthenticationJwtBearerModule : AbpModule |
|||
{ |
|||
|
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.AddHttpClient(); |
|||
context.Services.AddHttpContextAccessor(); |
|||
var abpClaimsPrincipalFactoryOptions = context.Services.ExecutePreConfiguredActions<AbpClaimsPrincipalFactoryOptions>(); |
|||
if (abpClaimsPrincipalFactoryOptions.IsRemoteRefreshEnabled) |
|||
{ |
|||
context.Services.AddTransient<WebRemoteDynamicClaimsPrincipalContributor>(); |
|||
context.Services.AddTransient<WebRemoteDynamicClaimsPrincipalContributorCache>(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
0
framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer.DynamicClaims/Volo/Abp/AspNetCore/Authentication/JwtBearer/DynamicClaims/WebRemoteDynamicClaimsPrincipalContributor.cs → framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo/Abp/AspNetCore/Authentication/JwtBearer/DynamicClaims/WebRemoteDynamicClaimsPrincipalContributor.cs
0
framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer.DynamicClaims/Volo/Abp/AspNetCore/Authentication/JwtBearer/DynamicClaims/WebRemoteDynamicClaimsPrincipalContributor.cs → framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo/Abp/AspNetCore/Authentication/JwtBearer/DynamicClaims/WebRemoteDynamicClaimsPrincipalContributor.cs
0
framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer.DynamicClaims/Volo/Abp/AspNetCore/Authentication/JwtBearer/DynamicClaims/WebRemoteDynamicClaimsPrincipalContributorCache.cs → framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo/Abp/AspNetCore/Authentication/JwtBearer/DynamicClaims/WebRemoteDynamicClaimsPrincipalContributorCache.cs
0
framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer.DynamicClaims/Volo/Abp/AspNetCore/Authentication/JwtBearer/DynamicClaims/WebRemoteDynamicClaimsPrincipalContributorCache.cs → framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo/Abp/AspNetCore/Authentication/JwtBearer/DynamicClaims/WebRemoteDynamicClaimsPrincipalContributorCache.cs
0
framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer.DynamicClaims/Volo/Abp/AspNetCore/Authentication/JwtBearer/DynamicClaims/WebRemoteDynamicClaimsPrincipalContributorOptions.cs → framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo/Abp/AspNetCore/Authentication/JwtBearer/DynamicClaims/WebRemoteDynamicClaimsPrincipalContributorOptions.cs
0
framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer.DynamicClaims/Volo/Abp/AspNetCore/Authentication/JwtBearer/DynamicClaims/WebRemoteDynamicClaimsPrincipalContributorOptions.cs → framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo/Abp/AspNetCore/Authentication/JwtBearer/DynamicClaims/WebRemoteDynamicClaimsPrincipalContributorOptions.cs
Loading…
Reference in new issue