Skip to content

Commit

Permalink
Merge pull request #2 from jxnkwlp/feature/apikey
Browse files Browse the repository at this point in the history
feat: add api key module
jxnkwlp authored Sep 23, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 776d3ca + 2878df6 commit 98f9cfc
Showing 135 changed files with 4,641 additions and 23 deletions.
69 changes: 69 additions & 0 deletions Sample.sln
Original file line number Diff line number Diff line change
@@ -143,6 +143,28 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Passingwind.Abp.Identity.Ht
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Passingwind.Abp.Identity.AspNetCore", "modules\identity\src\Passingwind.Abp.Identity.AspNetCore\Passingwind.Abp.Identity.AspNetCore.csproj", "{EFBFEBE3-3518-4995-9D5C-F6A29BA4894F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "api-keys", "api-keys", "{3B7ADAD0-F810-48EB-9AF5-7580F403170F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{964E905E-FAD8-4098-8131-E7300F99B604}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Passingwind.Abp.ApiKey.Domain.Shared", "modules\api-keys\src\Passingwind.Abp.ApiKey.Domain.Shared\Passingwind.Abp.ApiKey.Domain.Shared.csproj", "{9AF1ED86-13FC-4E46-9574-A9280E80B1F5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Passingwind.Abp.ApiKey.Domain", "modules\api-keys\src\Passingwind.Abp.ApiKey.Domain\Passingwind.Abp.ApiKey.Domain.csproj", "{F7B2195B-0E3F-46A4-8A5A-511B63980549}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Passingwind.Abp.ApiKey.Application.Contracts", "modules\api-keys\src\Passingwind.Abp.ApiKey.Application.Contracts\Passingwind.Abp.ApiKey.Application.Contracts.csproj", "{9D030937-962B-4B73-85FC-C85D258A124D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Passingwind.Abp.ApiKey.Application", "modules\api-keys\src\Passingwind.Abp.ApiKey.Application\Passingwind.Abp.ApiKey.Application.csproj", "{174F7743-BB3B-4352-B713-0F10AABC1991}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Passingwind.Abp.ApiKey.EntityFrameworkCore", "modules\api-keys\src\Passingwind.Abp.ApiKey.EntityFrameworkCore\Passingwind.Abp.ApiKey.EntityFrameworkCore.csproj", "{04B199FE-0FF7-459F-941E-AE548FF5C0B8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Passingwind.Abp.ApiKey.MongoDB", "modules\api-keys\src\Passingwind.Abp.ApiKey.MongoDB\Passingwind.Abp.ApiKey.MongoDB.csproj", "{4A5C9CD7-C670-4E3F-A9B2-4609CC29F00C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Passingwind.Abp.ApiKey.HttpApi", "modules\api-keys\src\Passingwind.Abp.ApiKey.HttpApi\Passingwind.Abp.ApiKey.HttpApi.csproj", "{D97B95F2-C139-42DE-940F-E2E5E034639B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Passingwind.Abp.ApiKey.HttpApi.Client", "modules\api-keys\src\Passingwind.Abp.ApiKey.HttpApi.Client\Passingwind.Abp.ApiKey.HttpApi.Client.csproj", "{634BE0CD-3E3A-40CE-97A5-38C40D6DD867}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Passingwind.Abp.ApiKey.AspNetCore", "modules\api-keys\src\Passingwind.Abp.ApiKey.AspNetCore\Passingwind.Abp.ApiKey.AspNetCore.csproj", "{88FBA08B-9CAE-41DE-8573-EC9D657B3387}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -369,6 +391,42 @@ Global
{EFBFEBE3-3518-4995-9D5C-F6A29BA4894F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EFBFEBE3-3518-4995-9D5C-F6A29BA4894F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EFBFEBE3-3518-4995-9D5C-F6A29BA4894F}.Release|Any CPU.Build.0 = Release|Any CPU
{9AF1ED86-13FC-4E46-9574-A9280E80B1F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9AF1ED86-13FC-4E46-9574-A9280E80B1F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9AF1ED86-13FC-4E46-9574-A9280E80B1F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9AF1ED86-13FC-4E46-9574-A9280E80B1F5}.Release|Any CPU.Build.0 = Release|Any CPU
{F7B2195B-0E3F-46A4-8A5A-511B63980549}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F7B2195B-0E3F-46A4-8A5A-511B63980549}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F7B2195B-0E3F-46A4-8A5A-511B63980549}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F7B2195B-0E3F-46A4-8A5A-511B63980549}.Release|Any CPU.Build.0 = Release|Any CPU
{9D030937-962B-4B73-85FC-C85D258A124D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9D030937-962B-4B73-85FC-C85D258A124D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9D030937-962B-4B73-85FC-C85D258A124D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9D030937-962B-4B73-85FC-C85D258A124D}.Release|Any CPU.Build.0 = Release|Any CPU
{174F7743-BB3B-4352-B713-0F10AABC1991}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{174F7743-BB3B-4352-B713-0F10AABC1991}.Debug|Any CPU.Build.0 = Debug|Any CPU
{174F7743-BB3B-4352-B713-0F10AABC1991}.Release|Any CPU.ActiveCfg = Release|Any CPU
{174F7743-BB3B-4352-B713-0F10AABC1991}.Release|Any CPU.Build.0 = Release|Any CPU
{04B199FE-0FF7-459F-941E-AE548FF5C0B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{04B199FE-0FF7-459F-941E-AE548FF5C0B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{04B199FE-0FF7-459F-941E-AE548FF5C0B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{04B199FE-0FF7-459F-941E-AE548FF5C0B8}.Release|Any CPU.Build.0 = Release|Any CPU
{4A5C9CD7-C670-4E3F-A9B2-4609CC29F00C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4A5C9CD7-C670-4E3F-A9B2-4609CC29F00C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A5C9CD7-C670-4E3F-A9B2-4609CC29F00C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4A5C9CD7-C670-4E3F-A9B2-4609CC29F00C}.Release|Any CPU.Build.0 = Release|Any CPU
{D97B95F2-C139-42DE-940F-E2E5E034639B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D97B95F2-C139-42DE-940F-E2E5E034639B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D97B95F2-C139-42DE-940F-E2E5E034639B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D97B95F2-C139-42DE-940F-E2E5E034639B}.Release|Any CPU.Build.0 = Release|Any CPU
{634BE0CD-3E3A-40CE-97A5-38C40D6DD867}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{634BE0CD-3E3A-40CE-97A5-38C40D6DD867}.Debug|Any CPU.Build.0 = Debug|Any CPU
{634BE0CD-3E3A-40CE-97A5-38C40D6DD867}.Release|Any CPU.ActiveCfg = Release|Any CPU
{634BE0CD-3E3A-40CE-97A5-38C40D6DD867}.Release|Any CPU.Build.0 = Release|Any CPU
{88FBA08B-9CAE-41DE-8573-EC9D657B3387}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{88FBA08B-9CAE-41DE-8573-EC9D657B3387}.Debug|Any CPU.Build.0 = Debug|Any CPU
{88FBA08B-9CAE-41DE-8573-EC9D657B3387}.Release|Any CPU.ActiveCfg = Release|Any CPU
{88FBA08B-9CAE-41DE-8573-EC9D657B3387}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -441,6 +499,17 @@ Global
{3C6EBC0E-2677-4826-9B9F-D93547C4C483} = {0FBA4154-8477-4C8E-BFF0-D5D9017F1064}
{41135277-9193-4152-9953-26FE37F0E2D4} = {1D9AB036-09A0-4645-B692-4CFC6B63A5C9}
{EFBFEBE3-3518-4995-9D5C-F6A29BA4894F} = {1D9AB036-09A0-4645-B692-4CFC6B63A5C9}
{3B7ADAD0-F810-48EB-9AF5-7580F403170F} = {9EAC2FB6-A28A-4851-B809-BF8216AAAFE0}
{964E905E-FAD8-4098-8131-E7300F99B604} = {3B7ADAD0-F810-48EB-9AF5-7580F403170F}
{9AF1ED86-13FC-4E46-9574-A9280E80B1F5} = {964E905E-FAD8-4098-8131-E7300F99B604}
{F7B2195B-0E3F-46A4-8A5A-511B63980549} = {964E905E-FAD8-4098-8131-E7300F99B604}
{9D030937-962B-4B73-85FC-C85D258A124D} = {964E905E-FAD8-4098-8131-E7300F99B604}
{174F7743-BB3B-4352-B713-0F10AABC1991} = {964E905E-FAD8-4098-8131-E7300F99B604}
{04B199FE-0FF7-459F-941E-AE548FF5C0B8} = {964E905E-FAD8-4098-8131-E7300F99B604}
{4A5C9CD7-C670-4E3F-A9B2-4609CC29F00C} = {964E905E-FAD8-4098-8131-E7300F99B604}
{D97B95F2-C139-42DE-940F-E2E5E034639B} = {964E905E-FAD8-4098-8131-E7300F99B604}
{634BE0CD-3E3A-40CE-97A5-38C40D6DD867} = {964E905E-FAD8-4098-8131-E7300F99B604}
{88FBA08B-9CAE-41DE-8573-EC9D657B3387} = {964E905E-FAD8-4098-8131-E7300F99B604}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}
1 change: 1 addition & 0 deletions host/src/Sample.Application/Sample.Application.csproj
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@

<ItemGroup>
<ProjectReference Include="..\..\..\modules\account\src\Passingwind.Abp.Account.Application\Passingwind.Abp.Account.Application.csproj" />
<ProjectReference Include="..\..\..\modules\api-keys\src\Passingwind.Abp.ApiKey.Application\Passingwind.Abp.ApiKey.Application.csproj" />
<ProjectReference Include="..\..\..\modules\file-management\src\Passingwind.Abp.FileManagement.Application\Passingwind.Abp.FileManagement.Application.csproj" />
<ProjectReference Include="..\..\..\modules\identity-client-management\src\Passingwind.Abp.IdentityClientManagement.Application\Passingwind.Abp.IdentityClientManagement.Application.csproj" />
<ProjectReference Include="..\..\..\modules\identity\src\Passingwind.Abp.Identity.Application\Passingwind.Abp.Identity.Application.csproj" />
4 changes: 3 additions & 1 deletion host/src/Sample.Application/SampleApplicationModule.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Passingwind.Abp.Account;
using Passingwind.Abp.ApiKey;
using Passingwind.Abp.FileManagement;
using Passingwind.Abp.Identity;
using Passingwind.Abp.IdentityClientManagement;
@@ -24,8 +25,9 @@ namespace Sample;
typeof(AbpSettingManagementApplicationModule)
)]
[DependsOn(typeof(AccountApplicationModule))]
[DependsOn(typeof(IdentityApplicationModule))]
[DependsOn(typeof(ApiKeyApplicationModule))]
[DependsOn(typeof(FileManagementApplicationModule))]
[DependsOn(typeof(IdentityApplicationModule))]
[DependsOn(typeof(IdentityClientManagementApplicationModule))]
public class SampleApplicationModule : AbpModule
{
1 change: 1 addition & 0 deletions host/src/Sample.Domain/Sample.Domain.csproj
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@

<ItemGroup>
<ProjectReference Include="..\..\..\modules\account\src\Passingwind.Abp.Account.Domain\Passingwind.Abp.Account.Domain.csproj" />
<ProjectReference Include="..\..\..\modules\api-keys\src\Passingwind.Abp.ApiKey.Domain\Passingwind.Abp.ApiKey.Domain.csproj" />
<ProjectReference Include="..\..\..\modules\file-management\src\Passingwind.Abp.FileManagement.Domain\Passingwind.Abp.FileManagement.Domain.csproj" />
<ProjectReference Include="..\..\..\modules\identity-client-management\src\Passingwind.Abp.IdentityClientManagement.Domain\Passingwind.Abp.IdentityClientManagement.Domain.csproj" />
<ProjectReference Include="..\..\..\modules\identity\src\Passingwind.Abp.Identity.Domain\Passingwind.Abp.Identity.Domain.csproj" />
4 changes: 3 additions & 1 deletion host/src/Sample.Domain/SampleDomainModule.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Passingwind.Abp.ApiKey;
using Passingwind.Abp.FileManagement;
using Passingwind.Abp.Identity;
using Passingwind.Abp.IdentityClientManagement;
@@ -33,9 +34,10 @@ namespace Sample;
typeof(AbpTenantManagementDomainModule),
typeof(AbpEmailingModule)
)]
[DependsOn(typeof(IdentityDomainModule))]
[DependsOn(typeof(ApiKeyDomainModule))]
[DependsOn(typeof(FileManagementDomainModule))]
[DependsOn(typeof(IdentityClientManagementDomainModule))]
[DependsOn(typeof(IdentityDomainModule))]
public class SampleDomainModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.EntityFrameworkCore;
using Passingwind.Abp.ApiKey.EntityFrameworkCore;
using Passingwind.Abp.FileManagement.EntityFrameworkCore;
using Passingwind.Abp.IdentityClientManagement.EntityFrameworkCore;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
@@ -81,6 +82,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)

modelBuilder.ConfigureFileManagement();
modelBuilder.ConfigureIdentityClientManagement();
modelBuilder.ConfigureApiKey();

/* Configure your own tables/entities inside here */

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Uow;
using Microsoft.Extensions.DependencyInjection;
using Passingwind.Abp.ApiKey.EntityFrameworkCore;
using Passingwind.Abp.FileManagement.EntityFrameworkCore;
using Passingwind.Abp.IdentityClientManagement.EntityFrameworkCore;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
@@ -12,9 +13,6 @@
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
using Passingwind.Abp.FileManagement;
using Passingwind.Abp.FileManagement.EntityFrameworkCore;
using Passingwind.Abp.IdentityClientManagement.EntityFrameworkCore;

namespace Sample.EntityFrameworkCore;

@@ -30,6 +28,7 @@ namespace Sample.EntityFrameworkCore;
typeof(AbpTenantManagementEntityFrameworkCoreModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule)
)]
[DependsOn(typeof(ApiKeyEntityFrameworkCoreModule))]
[DependsOn(typeof(FileManagementEntityFrameworkCoreModule))]
[DependsOn(typeof(IdentityClientManagementEntityFrameworkCoreModule))]
public class SampleEntityFrameworkCoreModule : AbpModule
@@ -43,17 +42,16 @@ public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<SampleDbContext>(options =>
{
/* Remove "includeAllEntities: true" to create
* default repositories only for aggregate roots */
/* Remove "includeAllEntities: true" to create
* default repositories only for aggregate roots */
options.AddDefaultRepositories(includeAllEntities: true);
});

Configure<AbpDbContextOptions>(options =>
{
/* The main point to change your DBMS.
* See also SampleMigrationsDbContextFactory for EF Core tooling. */
/* The main point to change your DBMS.
* See also SampleMigrationsDbContextFactory for EF Core tooling. */
options.UseSqlServer();
});

}
}
Loading

0 comments on commit 98f9cfc

Please sign in to comment.