diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..c941e52
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+**/wwwroot/libs/** linguist-vendored
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..af6d94f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,258 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+
+# Visual Studio 2015 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# DNX
+project.lock.json
+artifacts/
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# TODO: Comment the next line if you want to checkin your web deploy settings
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+# NuGet v3's project.json files produces more ignoreable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.pfx
+*.publishsettings
+node_modules/
+orleans.codegen.cs
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+*.mdf
+*.ldf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+# CacheManagement
+host/EasyAbp.CacheManagement.IdentityServer/Logs/logs.txt
+host/EasyAbp.CacheManagement.HttpApi.Host/Logs/logs.txt
+host/EasyAbp.CacheManagement.Web.Host/Logs/logs.txt
+host/EasyAbp.CacheManagement.Web.Unified/Logs/logs.txt
diff --git a/EasyAbp.CacheManagement.sln b/EasyAbp.CacheManagement.sln
new file mode 100644
index 0000000..66f1647
--- /dev/null
+++ b/EasyAbp.CacheManagement.sln
@@ -0,0 +1,167 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29001.49
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.Domain.Shared", "src\EasyAbp.CacheManagement.Domain.Shared\EasyAbp.CacheManagement.Domain.Shared.csproj", "{D64C1577-4929-4B60-939E-96DE1534891A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.Domain", "src\EasyAbp.CacheManagement.Domain\EasyAbp.CacheManagement.Domain.csproj", "{F2840BC7-0188-4606-9126-DADD0F5ABF7A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.Application.Contracts", "src\EasyAbp.CacheManagement.Application.Contracts\EasyAbp.CacheManagement.Application.Contracts.csproj", "{BD65D04F-08D5-40C1-8C24-77CA0BACB877}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.Application", "src\EasyAbp.CacheManagement.Application\EasyAbp.CacheManagement.Application.csproj", "{78040F9E-3501-4A40-82DF-00A597710F35}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{649A3FFA-182F-4E56-9717-E6A9A2BEC545}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "host", "host", "{E400416D-2895-4512-9D17-90681EEC7E0A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.EntityFrameworkCore", "src\EasyAbp.CacheManagement.EntityFrameworkCore\EasyAbp.CacheManagement.EntityFrameworkCore.csproj", "{0CE86223-D31D-4315-A1F5-87BA3EE1B844}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.MongoDB", "src\EasyAbp.CacheManagement.MongoDB\EasyAbp.CacheManagement.MongoDB.csproj", "{F1C58097-4C08-4D88-8976-6B3389391481}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.HttpApi", "src\EasyAbp.CacheManagement.HttpApi\EasyAbp.CacheManagement.HttpApi.csproj", "{077AA5F8-8B61-420C-A6B5-0150A66FDB34}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.HttpApi.Client", "src\EasyAbp.CacheManagement.HttpApi.Client\EasyAbp.CacheManagement.HttpApi.Client.csproj", "{36E2735F-CEAB-44C8-A6D1-2CDAFF399751}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.TestBase", "test\EasyAbp.CacheManagement.TestBase\EasyAbp.CacheManagement.TestBase.csproj", "{C5BB573D-3030-4BCB-88B7-F6A85C32766C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.EntityFrameworkCore.Tests", "test\EasyAbp.CacheManagement.EntityFrameworkCore.Tests\EasyAbp.CacheManagement.EntityFrameworkCore.Tests.csproj", "{527F645C-C1FC-406E-8479-81386C8ECF13}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.MongoDB.Tests", "test\EasyAbp.CacheManagement.MongoDB.Tests\EasyAbp.CacheManagement.MongoDB.Tests.csproj", "{D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.Domain.Tests", "test\EasyAbp.CacheManagement.Domain.Tests\EasyAbp.CacheManagement.Domain.Tests.csproj", "{E60895E5-79C4-447D-88B7-85CB5BA336A4}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.Application.Tests", "test\EasyAbp.CacheManagement.Application.Tests\EasyAbp.CacheManagement.Application.Tests.csproj", "{90CB5DC4-C040-45C7-8900-9688B26405BC}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.HttpApi.Host", "host\EasyAbp.CacheManagement.HttpApi.Host\EasyAbp.CacheManagement.HttpApi.Host.csproj", "{37B135B0-DAFE-4616-B25C-1BDF32FC44A2}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.Web", "src\EasyAbp.CacheManagement.Web\EasyAbp.CacheManagement.Web.csproj", "{3B7B6317-1B85-4164-8E11-75574F80AE17}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.HttpApi.Client.ConsoleTestApp", "test\EasyAbp.CacheManagement.HttpApi.Client.ConsoleTestApp\EasyAbp.CacheManagement.HttpApi.Client.ConsoleTestApp.csproj", "{1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.Web.Host", "host\EasyAbp.CacheManagement.Web.Host\EasyAbp.CacheManagement.Web.Host.csproj", "{73513786-B6C6-4A21-89C5-0FBDD0A46107}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.IdentityServer", "host\EasyAbp.CacheManagement.IdentityServer\EasyAbp.CacheManagement.IdentityServer.csproj", "{690203F4-3CD5-4569-88D9-EE831EEA5F5F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.Host.Shared", "host\EasyAbp.CacheManagement.Host.Shared\EasyAbp.CacheManagement.Host.Shared.csproj", "{F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.CacheManagement.Web.Unified", "host\EasyAbp.CacheManagement.Web.Unified\EasyAbp.CacheManagement.Web.Unified.csproj", "{3D872C41-E226-45C8-89C1-9D3DBD7C73F2}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D64C1577-4929-4B60-939E-96DE1534891A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D64C1577-4929-4B60-939E-96DE1534891A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D64C1577-4929-4B60-939E-96DE1534891A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D64C1577-4929-4B60-939E-96DE1534891A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Release|Any CPU.Build.0 = Release|Any CPU
+ {78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F1C58097-4C08-4D88-8976-6B3389391481}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F1C58097-4C08-4D88-8976-6B3389391481}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F1C58097-4C08-4D88-8976-6B3389391481}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F1C58097-4C08-4D88-8976-6B3389391481}.Release|Any CPU.Build.0 = Release|Any CPU
+ {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.Build.0 = Release|Any CPU
+ {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {527F645C-C1FC-406E-8479-81386C8ECF13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {527F645C-C1FC-406E-8479-81386C8ECF13}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {527F645C-C1FC-406E-8479-81386C8ECF13}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {527F645C-C1FC-406E-8479-81386C8ECF13}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {90CB5DC4-C040-45C7-8900-9688B26405BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {90CB5DC4-C040-45C7-8900-9688B26405BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {90CB5DC4-C040-45C7-8900-9688B26405BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {90CB5DC4-C040-45C7-8900-9688B26405BC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3B7B6317-1B85-4164-8E11-75574F80AE17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B7B6317-1B85-4164-8E11-75574F80AE17}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3B7B6317-1B85-4164-8E11-75574F80AE17}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3B7B6317-1B85-4164-8E11-75574F80AE17}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {73513786-B6C6-4A21-89C5-0FBDD0A46107}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {73513786-B6C6-4A21-89C5-0FBDD0A46107}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {73513786-B6C6-4A21-89C5-0FBDD0A46107}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {73513786-B6C6-4A21-89C5-0FBDD0A46107}.Release|Any CPU.Build.0 = Release|Any CPU
+ {690203F4-3CD5-4569-88D9-EE831EEA5F5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {690203F4-3CD5-4569-88D9-EE831EEA5F5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {690203F4-3CD5-4569-88D9-EE831EEA5F5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {690203F4-3CD5-4569-88D9-EE831EEA5F5F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3D872C41-E226-45C8-89C1-9D3DBD7C73F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3D872C41-E226-45C8-89C1-9D3DBD7C73F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3D872C41-E226-45C8-89C1-9D3DBD7C73F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3D872C41-E226-45C8-89C1-9D3DBD7C73F2}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {D64C1577-4929-4B60-939E-96DE1534891A} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
+ {F2840BC7-0188-4606-9126-DADD0F5ABF7A} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
+ {BD65D04F-08D5-40C1-8C24-77CA0BACB877} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
+ {78040F9E-3501-4A40-82DF-00A597710F35} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
+ {0CE86223-D31D-4315-A1F5-87BA3EE1B844} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
+ {F1C58097-4C08-4D88-8976-6B3389391481} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
+ {077AA5F8-8B61-420C-A6B5-0150A66FDB34} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
+ {36E2735F-CEAB-44C8-A6D1-2CDAFF399751} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
+ {C5BB573D-3030-4BCB-88B7-F6A85C32766C} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}
+ {527F645C-C1FC-406E-8479-81386C8ECF13} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}
+ {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}
+ {E60895E5-79C4-447D-88B7-85CB5BA336A4} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}
+ {90CB5DC4-C040-45C7-8900-9688B26405BC} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}
+ {37B135B0-DAFE-4616-B25C-1BDF32FC44A2} = {E400416D-2895-4512-9D17-90681EEC7E0A}
+ {3B7B6317-1B85-4164-8E11-75574F80AE17} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
+ {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}
+ {73513786-B6C6-4A21-89C5-0FBDD0A46107} = {E400416D-2895-4512-9D17-90681EEC7E0A}
+ {690203F4-3CD5-4569-88D9-EE831EEA5F5F} = {E400416D-2895-4512-9D17-90681EEC7E0A}
+ {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB} = {E400416D-2895-4512-9D17-90681EEC7E0A}
+ {3D872C41-E226-45C8-89C1-9D3DBD7C73F2} = {E400416D-2895-4512-9D17-90681EEC7E0A}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {4324B3B4-B60B-4E3C-91D8-59576B4E26DD}
+ EndGlobalSection
+EndGlobal
diff --git a/EasyAbp.CacheManagement.sln.DotSettings b/EasyAbp.CacheManagement.sln.DotSettings
new file mode 100644
index 0000000..cb0b2c9
--- /dev/null
+++ b/EasyAbp.CacheManagement.sln.DotSettings
@@ -0,0 +1,23 @@
+
+ True
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ Required
+ Required
+ Required
+ Required
+ False
+ True
+ False
+ False
+ True
+ False
+ False
+ SQL
+
\ No newline at end of file
diff --git a/common.props b/common.props
new file mode 100644
index 0000000..a3aed17
--- /dev/null
+++ b/common.props
@@ -0,0 +1,28 @@
+
+
+ latest
+ 0.1.0
+ $(NoWarn);CS1591
+ true
+ EasyAbp Team
+ An abp application module helps administrators to manage the app cache data.
+ https://github.com/EasyAbp/CacheManagement
+ https://github.com/EasyAbp/CacheManagement
+ abp module easyabp cache cachemanagement
+ EasyAbp
+ Apache-2.0
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers
+
+
+
+
\ No newline at end of file
diff --git a/host/EasyAbp.CacheManagement.Host.Shared/EasyAbp.CacheManagement.Host.Shared.csproj b/host/EasyAbp.CacheManagement.Host.Shared/EasyAbp.CacheManagement.Host.Shared.csproj
new file mode 100644
index 0000000..1ee9c16
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.Host.Shared/EasyAbp.CacheManagement.Host.Shared.csproj
@@ -0,0 +1,10 @@
+
+
+
+
+
+ netstandard2.0
+ EasyAbp.CacheManagement
+
+
+
diff --git a/host/EasyAbp.CacheManagement.Host.Shared/FodyWeavers.xml b/host/EasyAbp.CacheManagement.Host.Shared/FodyWeavers.xml
new file mode 100644
index 0000000..be0de3a
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.Host.Shared/FodyWeavers.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/host/EasyAbp.CacheManagement.Host.Shared/FodyWeavers.xsd b/host/EasyAbp.CacheManagement.Host.Shared/FodyWeavers.xsd
new file mode 100644
index 0000000..3f3946e
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.Host.Shared/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/host/EasyAbp.CacheManagement.Host.Shared/MultiTenancy/MultiTenancyConsts.cs b/host/EasyAbp.CacheManagement.Host.Shared/MultiTenancy/MultiTenancyConsts.cs
new file mode 100644
index 0000000..1a8e8a8
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.Host.Shared/MultiTenancy/MultiTenancyConsts.cs
@@ -0,0 +1,10 @@
+namespace EasyAbp.CacheManagement.MultiTenancy
+{
+ public static class MultiTenancyConsts
+ {
+ /* Enable/disable multi-tenancy in a single point
+ * to test your module with multi-tenancy.
+ */
+ public const bool IsEnabled = false;
+ }
+}
diff --git a/host/EasyAbp.CacheManagement.HttpApi.Host/CacheManagementHttpApiHostModule.cs b/host/EasyAbp.CacheManagement.HttpApi.Host/CacheManagementHttpApiHostModule.cs
new file mode 100644
index 0000000..0ce10b3
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.HttpApi.Host/CacheManagementHttpApiHostModule.cs
@@ -0,0 +1,176 @@
+using System;
+using System.IO;
+using System.Linq;
+using IdentityModel;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Cors;
+using Microsoft.AspNetCore.DataProtection;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using EasyAbp.CacheManagement.EntityFrameworkCore;
+using EasyAbp.CacheManagement.MultiTenancy;
+using StackExchange.Redis;
+using Microsoft.OpenApi.Models;
+using Swashbuckle.AspNetCore.Swagger;
+using Volo.Abp;
+using Volo.Abp.AspNetCore.MultiTenancy;
+using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy;
+using Volo.Abp.AspNetCore.Serilog;
+using Volo.Abp.AuditLogging.EntityFrameworkCore;
+using Volo.Abp.Autofac;
+using Volo.Abp.Caching;
+using Volo.Abp.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore.SqlServer;
+using Volo.Abp.Localization;
+using Volo.Abp.Modularity;
+using Volo.Abp.MultiTenancy;
+using Volo.Abp.PermissionManagement.EntityFrameworkCore;
+using Volo.Abp.Security.Claims;
+using Volo.Abp.SettingManagement.EntityFrameworkCore;
+using Volo.Abp.VirtualFileSystem;
+
+namespace EasyAbp.CacheManagement
+{
+ [DependsOn(
+ typeof(CacheManagementApplicationModule),
+ typeof(CacheManagementEntityFrameworkCoreModule),
+ typeof(CacheManagementHttpApiModule),
+ typeof(AbpAspNetCoreMvcUiMultiTenancyModule),
+ typeof(AbpAutofacModule),
+ typeof(AbpEntityFrameworkCoreSqlServerModule),
+ typeof(AbpAuditLoggingEntityFrameworkCoreModule),
+ typeof(AbpPermissionManagementEntityFrameworkCoreModule),
+ typeof(AbpSettingManagementEntityFrameworkCoreModule),
+ typeof(AbpAspNetCoreSerilogModule)
+ )]
+ public class CacheManagementHttpApiHostModule : AbpModule
+ {
+ private const string DefaultCorsPolicyName = "Default";
+
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ var hostingEnvironment = context.Services.GetHostingEnvironment();
+ var configuration = context.Services.GetConfiguration();
+
+ Configure(options =>
+ {
+ options.UseSqlServer();
+ });
+
+ Configure(options =>
+ {
+ options.IsEnabled = MultiTenancyConsts.IsEnabled;
+ });
+
+ if (hostingEnvironment.IsDevelopment())
+ {
+ Configure(options =>
+ {
+ options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}EasyAbp.CacheManagement.Domain.Shared", Path.DirectorySeparatorChar)));
+ options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}EasyAbp.CacheManagement.Domain", Path.DirectorySeparatorChar)));
+ options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}EasyAbp.CacheManagement.Application.Contracts", Path.DirectorySeparatorChar)));
+ options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}EasyAbp.CacheManagement.Application", Path.DirectorySeparatorChar)));
+ });
+ }
+
+ context.Services.AddSwaggerGen(
+ options =>
+ {
+ options.SwaggerDoc("v1", new OpenApiInfo { Title = "CacheManagement API", Version = "v1" });
+ options.DocInclusionPredicate((docName, description) => true);
+ options.CustomSchemaIds(type => type.FullName);
+ });
+
+ Configure(options =>
+ {
+ options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
+ options.Languages.Add(new LanguageInfo("en", "en", "English"));
+ options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
+ options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
+ options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
+ options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
+ });
+
+ //Updates AbpClaimTypes to be compatible with identity server claims.
+ AbpClaimTypes.UserId = JwtClaimTypes.Subject;
+ AbpClaimTypes.UserName = JwtClaimTypes.Name;
+ AbpClaimTypes.Role = JwtClaimTypes.Role;
+ AbpClaimTypes.Email = JwtClaimTypes.Email;
+
+ context.Services.AddAuthentication("Bearer")
+ .AddIdentityServerAuthentication(options =>
+ {
+ options.Authority = configuration["AuthServer:Authority"];
+ options.RequireHttpsMetadata = false;
+ options.ApiName = "CacheManagement";
+ });
+
+ Configure(options =>
+ {
+ options.KeyPrefix = "CacheManagement:";
+ });
+
+ context.Services.AddStackExchangeRedisCache(options =>
+ {
+ options.Configuration = configuration["Redis:Configuration"];
+ });
+
+ if (!hostingEnvironment.IsDevelopment())
+ {
+ var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
+ context.Services
+ .AddDataProtection()
+ .PersistKeysToStackExchangeRedis(redis, "CacheManagement-Protection-Keys");
+ }
+
+ context.Services.AddCors(options =>
+ {
+ options.AddPolicy(DefaultCorsPolicyName, builder =>
+ {
+ builder
+ .WithOrigins(
+ configuration["App:CorsOrigins"]
+ .Split(",", StringSplitOptions.RemoveEmptyEntries)
+ .Select(o => o.RemovePostFix("/"))
+ .ToArray()
+ )
+ .WithAbpExposedHeaders()
+ .SetIsOriginAllowedToAllowWildcardSubdomains()
+ .AllowAnyHeader()
+ .AllowAnyMethod()
+ .AllowCredentials();
+ });
+ });
+ }
+
+ public override void OnApplicationInitialization(ApplicationInitializationContext context)
+ {
+ var app = context.GetApplicationBuilder();
+
+ if (!context.GetEnvironment().IsDevelopment())
+ {
+ app.UseHsts();
+ }
+ app.UseHttpsRedirection();
+ app.UseCorrelationId();
+ app.UseVirtualFiles();
+ app.UseRouting();
+ app.UseCors(DefaultCorsPolicyName);
+ app.UseAuthentication();
+ if (MultiTenancyConsts.IsEnabled)
+ {
+ app.UseMultiTenancy();
+ }
+ app.UseAuthorization();
+ app.UseAbpRequestLocalization();
+ app.UseSwagger();
+ app.UseSwaggerUI(options =>
+ {
+ options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API");
+ });
+ app.UseAuditing();
+ app.UseAbpSerilogEnrichers();
+ app.UseMvcWithDefaultRouteAndArea();
+ }
+ }
+}
diff --git a/host/EasyAbp.CacheManagement.HttpApi.Host/Controllers/HomeController.cs b/host/EasyAbp.CacheManagement.HttpApi.Host/Controllers/HomeController.cs
new file mode 100644
index 0000000..ce05aeb
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.HttpApi.Host/Controllers/HomeController.cs
@@ -0,0 +1,13 @@
+using Microsoft.AspNetCore.Mvc;
+using Volo.Abp.AspNetCore.Mvc;
+
+namespace EasyAbp.CacheManagement.Controllers
+{
+ public class HomeController : AbpController
+ {
+ public ActionResult Index()
+ {
+ return Redirect("/swagger");
+ }
+ }
+}
diff --git a/host/EasyAbp.CacheManagement.HttpApi.Host/Dockerfile b/host/EasyAbp.CacheManagement.HttpApi.Host/Dockerfile
new file mode 100644
index 0000000..b762390
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.HttpApi.Host/Dockerfile
@@ -0,0 +1,18 @@
+FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base
+WORKDIR /app
+EXPOSE 80
+
+FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build
+WORKDIR /src
+COPY . .
+WORKDIR /src/templates/service/host/EasyAbp.CacheManagement.HttpApi.Host
+RUN dotnet restore -nowarn:msb3202,nu1503
+RUN dotnet build --no-restore -c Release -o /app
+
+FROM build AS publish
+RUN dotnet publish --no-restore -c Release -o /app
+
+FROM base AS final
+WORKDIR /app
+COPY --from=publish /app .
+ENTRYPOINT ["dotnet", "EasyAbp.CacheManagement.HttpApi.Host.dll"]
diff --git a/host/EasyAbp.CacheManagement.HttpApi.Host/EasyAbp.CacheManagement.HttpApi.Host.csproj b/host/EasyAbp.CacheManagement.HttpApi.Host/EasyAbp.CacheManagement.HttpApi.Host.csproj
new file mode 100644
index 0000000..060f12a
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.HttpApi.Host/EasyAbp.CacheManagement.HttpApi.Host.csproj
@@ -0,0 +1,43 @@
+
+
+
+
+
+ netcoreapp3.1
+ EasyAbp.CacheManagement
+ true
+ EasyAbp.CacheManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/host/EasyAbp.CacheManagement.HttpApi.Host/EntityFrameworkCore/CacheManagementHttpApiHostMigrationsDbContext.cs b/host/EasyAbp.CacheManagement.HttpApi.Host/EntityFrameworkCore/CacheManagementHttpApiHostMigrationsDbContext.cs
new file mode 100644
index 0000000..7956e9a
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.HttpApi.Host/EntityFrameworkCore/CacheManagementHttpApiHostMigrationsDbContext.cs
@@ -0,0 +1,21 @@
+using Microsoft.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore;
+
+namespace EasyAbp.CacheManagement.EntityFrameworkCore
+{
+ public class CacheManagementHttpApiHostMigrationsDbContext : AbpDbContext
+ {
+ public CacheManagementHttpApiHostMigrationsDbContext(DbContextOptions options)
+ : base(options)
+ {
+
+ }
+
+ protected override void OnModelCreating(ModelBuilder modelBuilder)
+ {
+ base.OnModelCreating(modelBuilder);
+
+ modelBuilder.ConfigureCacheManagement();
+ }
+ }
+}
diff --git a/host/EasyAbp.CacheManagement.HttpApi.Host/EntityFrameworkCore/CacheManagementHttpApiHostMigrationsDbContextFactory.cs b/host/EasyAbp.CacheManagement.HttpApi.Host/EntityFrameworkCore/CacheManagementHttpApiHostMigrationsDbContextFactory.cs
new file mode 100644
index 0000000..a0cf47a
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.HttpApi.Host/EntityFrameworkCore/CacheManagementHttpApiHostMigrationsDbContextFactory.cs
@@ -0,0 +1,29 @@
+using System.IO;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Design;
+using Microsoft.Extensions.Configuration;
+
+namespace EasyAbp.CacheManagement.EntityFrameworkCore
+{
+ public class CacheManagementHttpApiHostMigrationsDbContextFactory : IDesignTimeDbContextFactory
+ {
+ public CacheManagementHttpApiHostMigrationsDbContext CreateDbContext(string[] args)
+ {
+ var configuration = BuildConfiguration();
+
+ var builder = new DbContextOptionsBuilder()
+ .UseSqlServer(configuration.GetConnectionString("CacheManagement"));
+
+ return new CacheManagementHttpApiHostMigrationsDbContext(builder.Options);
+ }
+
+ private static IConfigurationRoot BuildConfiguration()
+ {
+ var builder = new ConfigurationBuilder()
+ .SetBasePath(Directory.GetCurrentDirectory())
+ .AddJsonFile("appsettings.json", optional: false);
+
+ return builder.Build();
+ }
+ }
+}
diff --git a/host/EasyAbp.CacheManagement.HttpApi.Host/FodyWeavers.xml b/host/EasyAbp.CacheManagement.HttpApi.Host/FodyWeavers.xml
new file mode 100644
index 0000000..00e1d9a
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.HttpApi.Host/FodyWeavers.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/host/EasyAbp.CacheManagement.HttpApi.Host/FodyWeavers.xsd b/host/EasyAbp.CacheManagement.HttpApi.Host/FodyWeavers.xsd
new file mode 100644
index 0000000..3f3946e
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.HttpApi.Host/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/host/EasyAbp.CacheManagement.HttpApi.Host/Program.cs b/host/EasyAbp.CacheManagement.HttpApi.Host/Program.cs
new file mode 100644
index 0000000..405e98c
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.HttpApi.Host/Program.cs
@@ -0,0 +1,51 @@
+using System;
+using System.IO;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Hosting;
+using Serilog;
+using Serilog.Events;
+
+namespace EasyAbp.CacheManagement
+{
+ public class Program
+ {
+ public static int Main(string[] args)
+ {
+ Log.Logger = new LoggerConfiguration()
+#if DEBUG
+ .MinimumLevel.Debug()
+#else
+ .MinimumLevel.Information()
+#endif
+ .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
+ .Enrich.FromLogContext()
+ .WriteTo.File("Logs/logs.txt")
+ .CreateLogger();
+
+ try
+ {
+ Log.Information("Starting web host.");
+ CreateHostBuilder(args).Build().Run();
+ return 0;
+ }
+ catch (Exception ex)
+ {
+ Log.Fatal(ex, "Host terminated unexpectedly!");
+ return 1;
+ }
+ finally
+ {
+ Log.CloseAndFlush();
+ }
+ }
+
+ internal static IHostBuilder CreateHostBuilder(string[] args) =>
+ Host.CreateDefaultBuilder(args)
+ .ConfigureWebHostDefaults(webBuilder =>
+ {
+ webBuilder.UseStartup();
+ })
+ .UseAutofac()
+ .UseSerilog();
+ }
+}
diff --git a/host/EasyAbp.CacheManagement.HttpApi.Host/Properties/launchSettings.json b/host/EasyAbp.CacheManagement.HttpApi.Host/Properties/launchSettings.json
new file mode 100644
index 0000000..46ee8b3
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.HttpApi.Host/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "https://localhost:44306",
+ "sslPort": 44306
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "EasyAbp.CacheManagement.DemoApp": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "applicationUrl": "https://localhost:44306",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/host/EasyAbp.CacheManagement.HttpApi.Host/Startup.cs b/host/EasyAbp.CacheManagement.HttpApi.Host/Startup.cs
new file mode 100644
index 0000000..1e9c68d
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.HttpApi.Host/Startup.cs
@@ -0,0 +1,21 @@
+using System;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
+
+namespace EasyAbp.CacheManagement
+{
+ public class Startup
+ {
+ public void ConfigureServices(IServiceCollection services)
+ {
+ services.AddApplication();
+ }
+
+ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
+ {
+ app.InitializeApplication();
+ }
+ }
+}
diff --git a/host/EasyAbp.CacheManagement.HttpApi.Host/appsettings.json b/host/EasyAbp.CacheManagement.HttpApi.Host/appsettings.json
new file mode 100644
index 0000000..5b3f159
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.HttpApi.Host/appsettings.json
@@ -0,0 +1,15 @@
+{
+ "App": {
+ "CorsOrigins": "https://*.CacheManagement.com,http://localhost:4200"
+ },
+ "ConnectionStrings": {
+ "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=CacheManagement_Main;Trusted_Connection=True;MultipleActiveResultSets=true",
+ "CacheManagement": "Server=(LocalDb)\\MSSQLLocalDB;Database=CacheManagement_Module;Trusted_Connection=True;MultipleActiveResultSets=true"
+ },
+ "Redis": {
+ "Configuration": "127.0.0.1"
+ },
+ "AuthServer": {
+ "Authority": "https://localhost:44329/"
+ }
+}
\ No newline at end of file
diff --git a/host/EasyAbp.CacheManagement.HttpApi.Host/yarn.lock b/host/EasyAbp.CacheManagement.HttpApi.Host/yarn.lock
new file mode 100644
index 0000000..fb57ccd
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.HttpApi.Host/yarn.lock
@@ -0,0 +1,4 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
diff --git a/host/EasyAbp.CacheManagement.IdentityServer/CacheManagementIdentityServerModule.cs b/host/EasyAbp.CacheManagement.IdentityServer/CacheManagementIdentityServerModule.cs
new file mode 100644
index 0000000..39b8fe0
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.IdentityServer/CacheManagementIdentityServerModule.cs
@@ -0,0 +1,214 @@
+using System;
+using System.Linq;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Cors;
+using Microsoft.AspNetCore.DataProtection;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using EasyAbp.CacheManagement.MultiTenancy;
+using StackExchange.Redis;
+using Microsoft.OpenApi.Models;
+using Swashbuckle.AspNetCore.Swagger;
+using Volo.Abp;
+using Volo.Abp.Account;
+using Volo.Abp.Account.Web;
+using Volo.Abp.AspNetCore.Authentication.JwtBearer;
+using Volo.Abp.AspNetCore.Mvc;
+using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy;
+using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
+using Volo.Abp.AspNetCore.Serilog;
+using Volo.Abp.Auditing;
+using Volo.Abp.AuditLogging.EntityFrameworkCore;
+using Volo.Abp.Autofac;
+using Volo.Abp.Caching;
+using Volo.Abp.Data;
+using Volo.Abp.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore.SqlServer;
+using Volo.Abp.FeatureManagement;
+using Volo.Abp.Identity;
+using Volo.Abp.Identity.EntityFrameworkCore;
+using Volo.Abp.IdentityServer.EntityFrameworkCore;
+using Volo.Abp.Localization;
+using Volo.Abp.Modularity;
+using Volo.Abp.MultiTenancy;
+using Volo.Abp.PermissionManagement;
+using Volo.Abp.PermissionManagement.EntityFrameworkCore;
+using Volo.Abp.PermissionManagement.HttpApi;
+using Volo.Abp.PermissionManagement.Identity;
+using Volo.Abp.SettingManagement.EntityFrameworkCore;
+using Volo.Abp.TenantManagement;
+using Volo.Abp.TenantManagement.EntityFrameworkCore;
+using Volo.Abp.Threading;
+using Volo.Abp.UI.Navigation.Urls;
+
+namespace EasyAbp.CacheManagement
+{
+ [DependsOn(
+ typeof(AbpAccountWebIdentityServerModule),
+ typeof(AbpAccountApplicationModule),
+ typeof(AbpAspNetCoreMvcUiMultiTenancyModule),
+ typeof(AbpAspNetCoreMvcModule),
+ typeof(AbpAspNetCoreMvcUiBasicThemeModule),
+ typeof(AbpAuditLoggingEntityFrameworkCoreModule),
+ typeof(AbpAutofacModule),
+ typeof(AbpEntityFrameworkCoreSqlServerModule),
+ typeof(AbpIdentityEntityFrameworkCoreModule),
+ typeof(AbpIdentityApplicationModule),
+ typeof(AbpIdentityHttpApiModule),
+ typeof(AbpIdentityServerEntityFrameworkCoreModule),
+ typeof(AbpPermissionManagementDomainIdentityModule),
+ typeof(AbpPermissionManagementEntityFrameworkCoreModule),
+ typeof(AbpPermissionManagementApplicationModule),
+ typeof(AbpPermissionManagementHttpApiModule),
+ typeof(AbpSettingManagementEntityFrameworkCoreModule),
+ typeof(AbpFeatureManagementApplicationModule),
+ typeof(AbpTenantManagementEntityFrameworkCoreModule),
+ typeof(AbpTenantManagementApplicationModule),
+ typeof(AbpTenantManagementHttpApiModule),
+ typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
+ typeof(CacheManagementApplicationContractsModule),
+ typeof(AbpAspNetCoreSerilogModule)
+ )]
+ public class CacheManagementIdentityServerModule : AbpModule
+ {
+ private const string DefaultCorsPolicyName = "Default";
+
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ var hostingEnvironment = context.Services.GetHostingEnvironment();
+ var configuration = context.Services.GetConfiguration();
+
+ Configure(options =>
+ {
+ options.UseSqlServer();
+ });
+
+ context.Services.AddSwaggerGen(
+ options =>
+ {
+ options.SwaggerDoc("v1", new OpenApiInfo { Title = "CacheManagement API", Version = "v1" });
+ options.DocInclusionPredicate((docName, description) => true);
+ options.CustomSchemaIds(type => type.FullName);
+ });
+
+ Configure(options =>
+ {
+ options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
+ options.Languages.Add(new LanguageInfo("en", "en", "English"));
+ options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
+ options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
+ options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
+ options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
+ });
+
+ Configure(options =>
+ {
+ //options.IsEnabledForGetRequests = true;
+ options.ApplicationName = "AuthServer";
+ });
+
+ Configure(options =>
+ {
+ options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
+ });
+
+ context.Services.AddAuthentication()
+ .AddIdentityServerAuthentication(options =>
+ {
+ options.Authority = configuration["AuthServer:Authority"];
+ options.RequireHttpsMetadata = false;
+ options.ApiName = configuration["AuthServer:ApiName"];
+ });
+
+ Configure(options =>
+ {
+ options.KeyPrefix = "CacheManagement:";
+ });
+
+ Configure(options =>
+ {
+ options.IsEnabled = MultiTenancyConsts.IsEnabled;
+ });
+
+ context.Services.AddStackExchangeRedisCache(options =>
+ {
+ options.Configuration = configuration["Redis:Configuration"];
+ });
+
+ if (!hostingEnvironment.IsDevelopment())
+ {
+ var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
+ context.Services
+ .AddDataProtection()
+ .PersistKeysToStackExchangeRedis(redis, "CacheManagement-Protection-Keys");
+ }
+
+ context.Services.AddCors(options =>
+ {
+ options.AddPolicy(DefaultCorsPolicyName, builder =>
+ {
+ builder
+ .WithOrigins(
+ configuration["App:CorsOrigins"]
+ .Split(",", StringSplitOptions.RemoveEmptyEntries)
+ .Select(o => o.RemovePostFix("/"))
+ .ToArray()
+ )
+ .WithAbpExposedHeaders()
+ .SetIsOriginAllowedToAllowWildcardSubdomains()
+ .AllowAnyHeader()
+ .AllowAnyMethod()
+ .AllowCredentials();
+ });
+ });
+ }
+
+ public override void OnApplicationInitialization(ApplicationInitializationContext context)
+ {
+ var app = context.GetApplicationBuilder();
+
+ if (!context.GetEnvironment().IsDevelopment())
+ {
+ app.UseHsts();
+ }
+ app.UseHttpsRedirection();
+ app.UseCorrelationId();
+ app.UseVirtualFiles();
+ app.UseRouting();
+ app.UseCors(DefaultCorsPolicyName);
+ app.UseAuthentication();
+ app.UseJwtTokenMiddleware();
+ if (MultiTenancyConsts.IsEnabled)
+ {
+ app.UseMultiTenancy();
+ }
+ app.UseIdentityServer();
+ app.UseAuthorization();
+ app.UseAbpRequestLocalization();
+ app.UseSwagger();
+ app.UseSwaggerUI(options =>
+ {
+ options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API");
+ });
+ app.UseAuditing();
+ app.UseAbpSerilogEnrichers();
+ app.UseMvcWithDefaultRouteAndArea();
+
+ SeedData(context);
+ }
+
+ private void SeedData(ApplicationInitializationContext context)
+ {
+ AsyncHelper.RunSync(async () =>
+ {
+ using (var scope = context.ServiceProvider.CreateScope())
+ {
+ await scope.ServiceProvider
+ .GetRequiredService()
+ .SeedAsync();
+ }
+ });
+ }
+ }
+}
diff --git a/host/EasyAbp.CacheManagement.IdentityServer/Dockerfile b/host/EasyAbp.CacheManagement.IdentityServer/Dockerfile
new file mode 100644
index 0000000..570c739
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.IdentityServer/Dockerfile
@@ -0,0 +1,18 @@
+FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base
+WORKDIR /app
+EXPOSE 80
+
+FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build
+WORKDIR /src
+COPY . .
+WORKDIR /src/templates/service/host/EasyAbp.CacheManagement.IdentityServer
+RUN dotnet restore -nowarn:msb3202,nu1503
+RUN dotnet build --no-restore -c Release -o /app
+
+FROM build AS publish
+RUN dotnet publish --no-restore -c Release -o /app
+
+FROM base AS final
+WORKDIR /app
+COPY --from=publish /app .
+ENTRYPOINT ["dotnet", "EasyAbp.CacheManagement.IdentityServer.dll"]
diff --git a/host/EasyAbp.CacheManagement.IdentityServer/EasyAbp.CacheManagement.IdentityServer.csproj b/host/EasyAbp.CacheManagement.IdentityServer/EasyAbp.CacheManagement.IdentityServer.csproj
new file mode 100644
index 0000000..e61587b
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.IdentityServer/EasyAbp.CacheManagement.IdentityServer.csproj
@@ -0,0 +1,62 @@
+
+
+
+ netcoreapp3.1
+ EasyAbp.CacheManagement
+ true
+ EasyAbp.CacheManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+ Always
+
+
+
+
diff --git a/host/EasyAbp.CacheManagement.IdentityServer/EntityFrameworkCore/IdentityServerHostMigrationsDbContext.cs b/host/EasyAbp.CacheManagement.IdentityServer/EntityFrameworkCore/IdentityServerHostMigrationsDbContext.cs
new file mode 100644
index 0000000..cdafca4
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.IdentityServer/EntityFrameworkCore/IdentityServerHostMigrationsDbContext.cs
@@ -0,0 +1,32 @@
+using Microsoft.EntityFrameworkCore;
+using Volo.Abp.AuditLogging.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore;
+using Volo.Abp.Identity.EntityFrameworkCore;
+using Volo.Abp.IdentityServer.EntityFrameworkCore;
+using Volo.Abp.PermissionManagement.EntityFrameworkCore;
+using Volo.Abp.SettingManagement.EntityFrameworkCore;
+using Volo.Abp.TenantManagement.EntityFrameworkCore;
+
+namespace EasyAbp.CacheManagement.EntityFrameworkCore
+{
+ public class IdentityServerHostMigrationsDbContext : AbpDbContext
+ {
+ public IdentityServerHostMigrationsDbContext(DbContextOptions options)
+ : base(options)
+ {
+
+ }
+
+ protected override void OnModelCreating(ModelBuilder modelBuilder)
+ {
+ base.OnModelCreating(modelBuilder);
+
+ modelBuilder.ConfigurePermissionManagement();
+ modelBuilder.ConfigureSettingManagement();
+ modelBuilder.ConfigureAuditLogging();
+ modelBuilder.ConfigureIdentity();
+ modelBuilder.ConfigureIdentityServer();
+ modelBuilder.ConfigureTenantManagement();
+ }
+ }
+}
diff --git a/host/EasyAbp.CacheManagement.IdentityServer/EntityFrameworkCore/IdentityServerHostMigrationsDbContextFactory.cs b/host/EasyAbp.CacheManagement.IdentityServer/EntityFrameworkCore/IdentityServerHostMigrationsDbContextFactory.cs
new file mode 100644
index 0000000..b5c9be8
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.IdentityServer/EntityFrameworkCore/IdentityServerHostMigrationsDbContextFactory.cs
@@ -0,0 +1,29 @@
+using System.IO;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Design;
+using Microsoft.Extensions.Configuration;
+
+namespace EasyAbp.CacheManagement.EntityFrameworkCore
+{
+ public class IdentityServerHostMigrationsDbContextFactory : IDesignTimeDbContextFactory
+ {
+ public IdentityServerHostMigrationsDbContext CreateDbContext(string[] args)
+ {
+ var configuration = BuildConfiguration();
+
+ var builder = new DbContextOptionsBuilder()
+ .UseSqlServer(configuration.GetConnectionString("Default"));
+
+ return new IdentityServerHostMigrationsDbContext(builder.Options);
+ }
+
+ private static IConfigurationRoot BuildConfiguration()
+ {
+ var builder = new ConfigurationBuilder()
+ .SetBasePath(Directory.GetCurrentDirectory())
+ .AddJsonFile("appsettings.json", optional: false);
+
+ return builder.Build();
+ }
+ }
+}
diff --git a/host/EasyAbp.CacheManagement.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs b/host/EasyAbp.CacheManagement.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs
new file mode 100644
index 0000000..a94bcfd
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs
@@ -0,0 +1,218 @@
+using Microsoft.Extensions.Configuration;
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Volo.Abp.Authorization.Permissions;
+using Volo.Abp.Data;
+using Volo.Abp.DependencyInjection;
+using Volo.Abp.Guids;
+using Volo.Abp.IdentityServer.ApiResources;
+using Volo.Abp.IdentityServer.Clients;
+using Volo.Abp.IdentityServer.IdentityResources;
+using Volo.Abp.PermissionManagement;
+using Volo.Abp.Uow;
+
+namespace EasyAbp.CacheManagement.IdentityServer
+{
+ public class IdentityServerDataSeedContributor : IDataSeedContributor, ITransientDependency
+ {
+ private readonly IApiResourceRepository _apiResourceRepository;
+ private readonly IClientRepository _clientRepository;
+ private readonly IIdentityResourceDataSeeder _identityResourceDataSeeder;
+ private readonly IGuidGenerator _guidGenerator;
+ private readonly IPermissionDataSeeder _permissionDataSeeder;
+ private readonly IConfiguration _configuration;
+
+ public IdentityServerDataSeedContributor(
+ IClientRepository clientRepository,
+ IApiResourceRepository apiResourceRepository,
+ IIdentityResourceDataSeeder identityResourceDataSeeder,
+ IGuidGenerator guidGenerator,
+ IPermissionDataSeeder permissionDataSeeder,
+ IConfiguration configuration)
+ {
+ _clientRepository = clientRepository;
+ _apiResourceRepository = apiResourceRepository;
+ _identityResourceDataSeeder = identityResourceDataSeeder;
+ _guidGenerator = guidGenerator;
+ _permissionDataSeeder = permissionDataSeeder;
+ _configuration = configuration;
+ }
+
+ [UnitOfWork]
+ public virtual async Task SeedAsync(DataSeedContext context)
+ {
+ await _identityResourceDataSeeder.CreateStandardResourcesAsync();
+ await CreateApiResourcesAsync();
+ await CreateClientsAsync();
+ }
+
+ private async Task CreateApiResourcesAsync()
+ {
+ var commonApiUserClaims = new[]
+ {
+ "email",
+ "email_verified",
+ "name",
+ "phone_number",
+ "phone_number_verified",
+ "role"
+ };
+
+ await CreateApiResourceAsync("CacheManagement", commonApiUserClaims);
+ }
+
+ private async Task CreateApiResourceAsync(string name, IEnumerable claims)
+ {
+ var apiResource = await _apiResourceRepository.FindByNameAsync(name);
+ if (apiResource == null)
+ {
+ apiResource = await _apiResourceRepository.InsertAsync(
+ new ApiResource(
+ _guidGenerator.Create(),
+ name,
+ name + " API"
+ ),
+ autoSave: true
+ );
+ }
+
+ foreach (var claim in claims)
+ {
+ if (apiResource.FindClaim(claim) == null)
+ {
+ apiResource.AddUserClaim(claim);
+ }
+ }
+
+ return await _apiResourceRepository.UpdateAsync(apiResource);
+ }
+
+ private async Task CreateClientsAsync()
+ {
+ const string commonSecret = "E5Xd4yMqjP5kjWFKrYgySBju6JVfCzMyFp7n2QmMrME=";
+
+ var commonScopes = new[]
+ {
+ "email",
+ "openid",
+ "profile",
+ "role",
+ "phone",
+ "address",
+ "CacheManagement"
+ };
+
+ var configurationSection = _configuration.GetSection("IdentityServer:Clients");
+
+ //Web Client
+ var webClientId = configurationSection["CacheManagement_Web:ClientId"];
+ if (!webClientId.IsNullOrWhiteSpace())
+ {
+ var webClientRootUrl = configurationSection["CacheManagement_Web:RootUrl"].EnsureEndsWith('/');
+ await CreateClientAsync(
+ webClientId,
+ commonScopes,
+ new[] { "hybrid" },
+ commonSecret,
+ redirectUri: $"{webClientRootUrl}signin-oidc",
+ postLogoutRedirectUri: $"{webClientRootUrl}signout-callback-oidc"
+ );
+ }
+
+ //Console Test Client
+ var consoleClientId = configurationSection["CacheManagement_ConsoleTestApp:ClientId"];
+ if (!consoleClientId.IsNullOrWhiteSpace())
+ {
+ await CreateClientAsync(
+ consoleClientId,
+ commonScopes,
+ new[] { "password", "client_credentials" },
+ commonSecret
+ );
+ }
+ }
+
+ private async Task CreateClientAsync(
+ string name,
+ IEnumerable scopes,
+ IEnumerable grantTypes,
+ string secret,
+ string redirectUri = null,
+ string postLogoutRedirectUri = null,
+ IEnumerable permissions = null)
+ {
+ var client = await _clientRepository.FindByCliendIdAsync(name);
+ if (client == null)
+ {
+ client = await _clientRepository.InsertAsync(
+ new Client(
+ _guidGenerator.Create(),
+ name
+ )
+ {
+ ClientName = name,
+ ProtocolType = "oidc",
+ Description = name,
+ AlwaysIncludeUserClaimsInIdToken = true,
+ AllowOfflineAccess = true,
+ AbsoluteRefreshTokenLifetime = 31536000, //365 days
+ AccessTokenLifetime = 31536000, //365 days
+ AuthorizationCodeLifetime = 300,
+ IdentityTokenLifetime = 300,
+ RequireConsent = false
+ },
+ autoSave: true
+ );
+ }
+
+ foreach (var scope in scopes)
+ {
+ if (client.FindScope(scope) == null)
+ {
+ client.AddScope(scope);
+ }
+ }
+
+ foreach (var grantType in grantTypes)
+ {
+ if (client.FindGrantType(grantType) == null)
+ {
+ client.AddGrantType(grantType);
+ }
+ }
+
+ if (client.FindSecret(secret) == null)
+ {
+ client.AddSecret(secret);
+ }
+
+ if (redirectUri != null)
+ {
+ if (client.FindRedirectUri(redirectUri) == null)
+ {
+ client.AddRedirectUri(redirectUri);
+ }
+ }
+
+ if (postLogoutRedirectUri != null)
+ {
+ if (client.FindPostLogoutRedirectUri(postLogoutRedirectUri) == null)
+ {
+ client.AddPostLogoutRedirectUri(postLogoutRedirectUri);
+ }
+ }
+
+ if (permissions != null)
+ {
+ await _permissionDataSeeder.SeedAsync(
+ ClientPermissionValueProvider.ProviderName,
+ name,
+ permissions
+ );
+ }
+
+ return await _clientRepository.UpdateAsync(client);
+ }
+ }
+}
diff --git a/host/EasyAbp.CacheManagement.IdentityServer/Migrations/20200106080828_Initial.Designer.cs b/host/EasyAbp.CacheManagement.IdentityServer/Migrations/20200106080828_Initial.Designer.cs
new file mode 100644
index 0000000..9126cfe
--- /dev/null
+++ b/host/EasyAbp.CacheManagement.IdentityServer/Migrations/20200106080828_Initial.Designer.cs
@@ -0,0 +1,1675 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using EasyAbp.CacheManagement.EntityFrameworkCore;
+
+namespace EasyAbp.CacheManagement.Migrations
+{
+ [DbContext(typeof(IdentityServerHostMigrationsDbContext))]
+ [Migration("20200106080828_Initial")]
+ partial class Initial
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "3.1.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128)
+ .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ApplicationName")
+ .HasColumnName("ApplicationName")
+ .HasColumnType("nvarchar(96)")
+ .HasMaxLength(96);
+
+ b.Property("BrowserInfo")
+ .HasColumnName("BrowserInfo")
+ .HasColumnType("nvarchar(512)")
+ .HasMaxLength(512);
+
+ b.Property("ClientId")
+ .HasColumnName("ClientId")
+ .HasColumnType("nvarchar(64)")
+ .HasMaxLength(64);
+
+ b.Property("ClientIpAddress")
+ .HasColumnName("ClientIpAddress")
+ .HasColumnType("nvarchar(64)")
+ .HasMaxLength(64);
+
+ b.Property("ClientName")
+ .HasColumnName("ClientName")
+ .HasColumnType("nvarchar(128)")
+ .HasMaxLength(128);
+
+ b.Property("Comments")
+ .HasColumnName("Comments")
+ .HasColumnType("nvarchar(256)")
+ .HasMaxLength(256);
+
+ b.Property("ConcurrencyStamp")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CorrelationId")
+ .HasColumnName("CorrelationId")
+ .HasColumnType("nvarchar(64)")
+ .HasMaxLength(64);
+
+ b.Property("Exceptions")
+ .HasColumnName("Exceptions")
+ .HasColumnType("nvarchar(4000)")
+ .HasMaxLength(4000);
+
+ b.Property("ExecutionDuration")
+ .HasColumnName("ExecutionDuration")
+ .HasColumnType("int");
+
+ b.Property("ExecutionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HttpMethod")
+ .HasColumnName("HttpMethod")
+ .HasColumnType("nvarchar(16)")
+ .HasMaxLength(16);
+
+ b.Property("HttpStatusCode")
+ .HasColumnName("HttpStatusCode")
+ .HasColumnType("int");
+
+ b.Property("ImpersonatorTenantId")
+ .HasColumnName("ImpersonatorTenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ImpersonatorUserId")
+ .HasColumnName("ImpersonatorUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Url")
+ .HasColumnName("Url")
+ .HasColumnType("nvarchar(256)")
+ .HasMaxLength(256);
+
+ b.Property("UserId")
+ .HasColumnName("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UserName")
+ .HasColumnName("UserName")
+ .HasColumnType("nvarchar(256)")
+ .HasMaxLength(256);
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "ExecutionTime");
+
+ b.HasIndex("TenantId", "UserId", "ExecutionTime");
+
+ b.ToTable("AbpAuditLogs");
+ });
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AuditLogId")
+ .HasColumnName("AuditLogId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ExecutionDuration")
+ .HasColumnName("ExecutionDuration")
+ .HasColumnType("int");
+
+ b.Property("ExecutionTime")
+ .HasColumnName("ExecutionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MethodName")
+ .HasColumnName("MethodName")
+ .HasColumnType("nvarchar(128)")
+ .HasMaxLength(128);
+
+ b.Property("Parameters")
+ .HasColumnName("Parameters")
+ .HasColumnType("nvarchar(2000)")
+ .HasMaxLength(2000);
+
+ b.Property("ServiceName")
+ .HasColumnName("ServiceName")
+ .HasColumnType("nvarchar(256)")
+ .HasMaxLength(256);
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AuditLogId");
+
+ b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime");
+
+ b.ToTable("AbpAuditLogActions");
+ });
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AuditLogId")
+ .HasColumnName("AuditLogId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ChangeTime")
+ .HasColumnName("ChangeTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ChangeType")
+ .HasColumnName("ChangeType")
+ .HasColumnType("tinyint");
+
+ b.Property("EntityId")
+ .IsRequired()
+ .HasColumnName("EntityId")
+ .HasColumnType("nvarchar(128)")
+ .HasMaxLength(128);
+
+ b.Property("EntityTenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("EntityTypeFullName")
+ .IsRequired()
+ .HasColumnName("EntityTypeFullName")
+ .HasColumnType("nvarchar(128)")
+ .HasMaxLength(128);
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AuditLogId");
+
+ b.HasIndex("TenantId", "EntityTypeFullName", "EntityId");
+
+ b.ToTable("AbpEntityChanges");
+ });
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("EntityChangeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("NewValue")
+ .HasColumnName("NewValue")
+ .HasColumnType("nvarchar(512)")
+ .HasMaxLength(512);
+
+ b.Property("OriginalValue")
+ .HasColumnName("OriginalValue")
+ .HasColumnType("nvarchar(512)")
+ .HasMaxLength(512);
+
+ b.Property("PropertyName")
+ .IsRequired()
+ .HasColumnName("PropertyName")
+ .HasColumnType("nvarchar(128)")
+ .HasMaxLength(128);
+
+ b.Property("PropertyTypeFullName")
+ .IsRequired()
+ .HasColumnName("PropertyTypeFullName")
+ .HasColumnType("nvarchar(64)")
+ .HasMaxLength(64);
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("EntityChangeId");
+
+ b.ToTable("AbpEntityPropertyChanges");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(256)")
+ .HasMaxLength(256);
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(256)")
+ .HasMaxLength(256);
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsStatic")
+ .HasColumnType("bit");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(256)")
+ .HasMaxLength(256);
+
+ b.Property("Regex")
+ .HasColumnType("nvarchar(512)")
+ .HasMaxLength(512);
+
+ b.Property("RegexDescription")
+ .HasColumnType("nvarchar(128)")
+ .HasMaxLength(128);
+
+ b.Property("Required")
+ .HasColumnType("bit");
+
+ b.Property("ValueType")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("AbpClaimTypes");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(256)")
+ .HasMaxLength(256);
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDefault")
+ .HasColumnName("IsDefault")
+ .HasColumnType("bit");
+
+ b.Property("IsPublic")
+ .HasColumnName("IsPublic")
+ .HasColumnType("bit");
+
+ b.Property("IsStatic")
+ .HasColumnName("IsStatic")
+ .HasColumnType("bit");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(256)")
+ .HasMaxLength(256);
+
+ b.Property("NormalizedName")
+ .IsRequired()
+ .HasColumnType("nvarchar(256)")
+ .HasMaxLength(256);
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedName");
+
+ b.ToTable("AbpRoles");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ClaimType")
+ .IsRequired()
+ .HasColumnType("nvarchar(256)")
+ .HasMaxLength(256);
+
+ b.Property("ClaimValue")
+ .HasColumnType("nvarchar(1024)")
+ .HasMaxLength(1024);
+
+ b.Property("RoleId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AbpRoleClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AccessFailedCount")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("AccessFailedCount")
+ .HasColumnType("int")
+ .HasDefaultValue(0);
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Email")
+ .IsRequired()
+ .HasColumnName("Email")
+ .HasColumnType("nvarchar(256)")
+ .HasMaxLength(256);
+
+ b.Property("EmailConfirmed")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("EmailConfirmed")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LockoutEnabled")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("LockoutEnabled")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LockoutEnd")
+ .HasColumnType("datetimeoffset");
+
+ b.Property("Name")
+ .HasColumnName("Name")
+ .HasColumnType("nvarchar(64)")
+ .HasMaxLength(64);
+
+ b.Property("NormalizedEmail")
+ .IsRequired()
+ .HasColumnName("NormalizedEmail")
+ .HasColumnType("nvarchar(256)")
+ .HasMaxLength(256);
+
+ b.Property("NormalizedUserName")
+ .IsRequired()
+ .HasColumnName("NormalizedUserName")
+ .HasColumnType("nvarchar(256)")
+ .HasMaxLength(256);
+
+ b.Property("PasswordHash")
+ .HasColumnName("PasswordHash")
+ .HasColumnType("nvarchar(256)")
+ .HasMaxLength(256);
+
+ b.Property("PhoneNumber")
+ .HasColumnName("PhoneNumber")
+ .HasColumnType("nvarchar(16)")
+ .HasMaxLength(16);
+
+ b.Property("PhoneNumberConfirmed")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("PhoneNumberConfirmed")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("SecurityStamp")
+ .IsRequired()
+ .HasColumnName("SecurityStamp")
+ .HasColumnType("nvarchar(256)")
+ .HasMaxLength(256);
+
+ b.Property("Surname")
+ .HasColumnName("Surname")
+ .HasColumnType("nvarchar(64)")
+ .HasMaxLength(64);
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TwoFactorEnabled")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("TwoFactorEnabled")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("UserName")
+ .IsRequired()
+ .HasColumnName("UserName")
+ .HasColumnType("nvarchar(256)")
+ .HasMaxLength(256);
+
+ b.HasKey("Id");
+
+ b.HasIndex("Email");
+
+ b.HasIndex("NormalizedEmail");
+
+ b.HasIndex("NormalizedUserName");
+
+ b.HasIndex("UserName");
+
+ b.ToTable("AbpUsers");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ClaimType")
+ .IsRequired()
+ .HasColumnType("nvarchar(256)")
+ .HasMaxLength(256);
+
+ b.Property("ClaimValue")
+ .HasColumnType("nvarchar(1024)")
+ .HasMaxLength(1024);
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AbpUserClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LoginProvider")
+ .HasColumnType("nvarchar(64)")
+ .HasMaxLength(64);
+
+ b.Property("ProviderDisplayName")
+ .HasColumnType("nvarchar(128)")
+ .HasMaxLength(128);
+
+ b.Property("ProviderKey")
+ .IsRequired()
+ .HasColumnType("nvarchar(196)")
+ .HasMaxLength(196);
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("UserId", "LoginProvider");
+
+ b.HasIndex("LoginProvider", "ProviderKey");
+
+ b.ToTable("AbpUserLogins");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("RoleId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("UserId", "RoleId");
+
+ b.HasIndex("RoleId", "UserId");
+
+ b.ToTable("AbpUserRoles");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LoginProvider")
+ .HasColumnType("nvarchar(64)")
+ .HasMaxLength(64);
+
+ b.Property("Name")
+ .HasColumnType("nvarchar(128)")
+ .HasMaxLength(128);
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Value")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("UserId", "LoginProvider", "Name");
+
+ b.ToTable("AbpUserTokens");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(1000)")
+ .HasMaxLength(1000);
+
+ b.Property("DisplayName")
+ .HasColumnType("nvarchar(200)")
+ .HasMaxLength(200);
+
+ b.Property("Enabled")
+ .HasColumnType("bit");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(200)")
+ .HasMaxLength(200);
+
+ b.Property("Properties")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.ToTable("IdentityServerApiResources");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
+ {
+ b.Property("ApiResourceId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Type")
+ .HasColumnType("nvarchar(200)")
+ .HasMaxLength(200);
+
+ b.HasKey("ApiResourceId", "Type");
+
+ b.ToTable("IdentityServerApiClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b =>
+ {
+ b.Property("ApiResourceId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Name")
+ .HasColumnType("nvarchar(200)")
+ .HasMaxLength(200);
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(1000)")
+ .HasMaxLength(1000);
+
+ b.Property("DisplayName")
+ .HasColumnType("nvarchar(200)")
+ .HasMaxLength(200);
+
+ b.Property("Emphasize")
+ .HasColumnType("bit");
+
+ b.Property("Required")
+ .HasColumnType("bit");
+
+ b.Property("ShowInDiscoveryDocument")
+ .HasColumnType("bit");
+
+ b.HasKey("ApiResourceId", "Name");
+
+ b.ToTable("IdentityServerApiScopes");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b =>
+ {
+ b.Property("ApiResourceId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Name")
+ .HasColumnType("nvarchar(200)")
+ .HasMaxLength(200);
+
+ b.Property("Type")
+ .HasColumnType("nvarchar(200)")
+ .HasMaxLength(200);
+
+ b.HasKey("ApiResourceId", "Name", "Type");
+
+ b.ToTable("IdentityServerApiScopeClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b =>
+ {
+ b.Property("ApiResourceId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Type")
+ .HasColumnType("nvarchar(250)")
+ .HasMaxLength(250);
+
+ b.Property("Value")
+ .HasColumnType("nvarchar(4000)")
+ .HasMaxLength(4000);
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(2000)")
+ .HasMaxLength(2000);
+
+ b.Property("Expiration")
+ .HasColumnType("datetime2");
+
+ b.HasKey("ApiResourceId", "Type", "Value");
+
+ b.ToTable("IdentityServerApiSecrets");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AbsoluteRefreshTokenLifetime")
+ .HasColumnType("int");
+
+ b.Property("AccessTokenLifetime")
+ .HasColumnType("int");
+
+ b.Property("AccessTokenType")
+ .HasColumnType("int");
+
+ b.Property("AllowAccessTokensViaBrowser")
+ .HasColumnType("bit");
+
+ b.Property("AllowOfflineAccess")
+ .HasColumnType("bit");
+
+ b.Property("AllowPlainTextPkce")
+ .HasColumnType("bit");
+
+ b.Property("AllowRememberConsent")
+ .HasColumnType("bit");
+
+ b.Property("AlwaysIncludeUserClaimsInIdToken")
+ .HasColumnType("bit");
+
+ b.Property("AlwaysSendClientClaims")
+ .HasColumnType("bit");
+
+ b.Property("AuthorizationCodeLifetime")
+ .HasColumnType("int");
+
+ b.Property("BackChannelLogoutSessionRequired")
+ .HasColumnType("bit");
+
+ b.Property("BackChannelLogoutUri")
+ .HasColumnType("nvarchar(2000)")
+ .HasMaxLength(2000);
+
+ b.Property("ClientClaimsPrefix")
+ .HasColumnType("nvarchar(200)")
+ .HasMaxLength(200);
+
+ b.Property("ClientId")
+ .IsRequired()
+ .HasColumnType("nvarchar(200)")
+ .HasMaxLength(200);
+
+ b.Property("ClientName")
+ .HasColumnType("nvarchar(200)")
+ .HasMaxLength(200);
+
+ b.Property("ClientUri")
+ .HasColumnType("nvarchar(2000)")
+ .HasMaxLength(2000);
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ConsentLifetime")
+ .HasColumnType("int");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(1000)")
+ .HasMaxLength(1000);
+
+ b.Property("DeviceCodeLifetime")
+ .HasColumnType("int");
+
+ b.Property("EnableLocalLogin")
+ .HasColumnType("bit");
+
+ b.Property("Enabled")
+ .HasColumnType("bit");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("FrontChannelLogoutSessionRequired")
+ .HasColumnType("bit");
+
+ b.Property("FrontChannelLogoutUri")
+ .HasColumnType("nvarchar(2000)")
+ .HasMaxLength(2000);
+
+ b.Property("IdentityTokenLifetime")
+ .HasColumnType("int");
+
+ b.Property("IncludeJwtId")
+ .HasColumnType("bit");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LogoUri")
+ .HasColumnType("nvarchar(2000)")
+ .HasMaxLength(2000);
+
+ b.Property("PairWiseSubjectSalt")
+ .HasColumnType("nvarchar(200)")
+ .HasMaxLength(200);
+
+ b.Property("ProtocolType")
+ .IsRequired()
+ .HasColumnType("nvarchar(200)")
+ .HasMaxLength(200);
+
+ b.Property("RefreshTokenExpiration")
+ .HasColumnType("int");
+
+ b.Property("RefreshTokenUsage")
+ .HasColumnType("int");
+
+ b.Property("RequireClientSecret")
+ .HasColumnType("bit");
+
+ b.Property("RequireConsent")
+ .HasColumnType("bit");
+
+ b.Property("RequirePkce")
+ .HasColumnType("bit");
+
+ b.Property("SlidingRefreshTokenLifetime")
+ .HasColumnType("int");
+
+ b.Property("UpdateAccessTokenClaimsOnRefresh")
+ .HasColumnType("bit");
+
+ b.Property("UserCodeType")
+ .HasColumnType("nvarchar(100)")
+ .HasMaxLength(100);
+
+ b.Property("UserSsoLifetime")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClientId");
+
+ b.ToTable("IdentityServerClients");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b =>
+ {
+ b.Property("ClientId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Type")
+ .HasColumnType("nvarchar(250)")
+ .HasMaxLength(250);
+
+ b.Property("Value")
+ .HasColumnType("nvarchar(250)")
+ .HasMaxLength(250);
+
+ b.HasKey("ClientId", "Type", "Value");
+
+ b.ToTable("IdentityServerClientClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b =>
+ {
+ b.Property("ClientId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Origin")
+ .HasColumnType("nvarchar(150)")
+ .HasMaxLength(150);
+
+ b.HasKey("ClientId", "Origin");
+
+ b.ToTable("IdentityServerClientCorsOrigins");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b =>
+ {
+ b.Property("ClientId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("GrantType")
+ .HasColumnType("nvarchar(250)")
+ .HasMaxLength(250);
+
+ b.HasKey("ClientId", "GrantType");
+
+ b.ToTable("IdentityServerClientGrantTypes");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b =>
+ {
+ b.Property("ClientId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Provider")
+ .HasColumnType("nvarchar(200)")
+ .HasMaxLength(200);
+
+ b.HasKey("ClientId", "Provider");
+
+ b.ToTable("IdentityServerClientIdPRestrictions");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b =>
+ {
+ b.Property("ClientId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("PostLogoutRedirectUri")
+ .HasColumnType("nvarchar(2000)")
+ .HasMaxLength(2000);
+
+ b.HasKey("ClientId", "PostLogoutRedirectUri");
+
+ b.ToTable("IdentityServerClientPostLogoutRedirectUris");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b =>
+ {
+ b.Property("ClientId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Key")
+ .HasColumnType("nvarchar(250)")
+ .HasMaxLength(250);
+
+ b.Property("Value")
+ .IsRequired()
+ .HasColumnType("nvarchar(2000)")
+ .HasMaxLength(2000);
+
+ b.HasKey("ClientId", "Key");
+
+ b.ToTable("IdentityServerClientProperties");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b =>
+ {
+ b.Property("ClientId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("RedirectUri")
+ .HasColumnType("nvarchar(2000)")
+ .HasMaxLength(2000);
+
+ b.HasKey("ClientId", "RedirectUri");
+
+ b.ToTable("IdentityServerClientRedirectUris");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b =>
+ {
+ b.Property("ClientId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Scope")
+ .HasColumnType("nvarchar(200)")
+ .HasMaxLength(200);
+
+ b.HasKey("ClientId", "Scope");
+
+ b.ToTable("IdentityServerClientScopes");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b =>
+ {
+ b.Property("ClientId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Type")
+ .HasColumnType("nvarchar(250)")
+ .HasMaxLength(250);
+
+ b.Property("Value")
+ .HasColumnType("nvarchar(4000)")
+ .HasMaxLength(4000);
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(2000)")
+ .HasMaxLength(2000);
+
+ b.Property("Expiration")
+ .HasColumnType("datetime2");
+
+ b.HasKey("ClientId", "Type", "Value");
+
+ b.ToTable("IdentityServerClientSecrets");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ClientId")
+ .IsRequired()
+ .HasColumnType("nvarchar(200)")
+ .HasMaxLength(200);
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property