Browse Source

创建身份认证服务器Api项目

pull/1/head
cKey 6 years ago
parent
commit
8d2d274439
  1. 7
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/.gitignore
  2. 1
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.csproj.CoreCompileInputs.cache
  3. 1
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.csproj.FileListAbsolute.txt
  4. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.csprojAssemblyReference.cache
  5. 2
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/LINGYUN.ApiGateway.Application.Contracts.csproj.nuget.g.props
  6. 7
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/.gitignore
  7. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.dll
  8. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.dll
  9. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.csprojAssemblyReference.cache
  10. 7
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain.Shared/.gitignore
  11. 1
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain.Shared/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.csproj.CoreCompileInputs.cache
  12. 1
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain.Shared/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.csproj.FileListAbsolute.txt
  13. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain.Shared/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.csprojAssemblyReference.cache
  14. 2
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain.Shared/obj/LINGYUN.ApiGateway.Domain.Shared.csproj.nuget.g.props
  15. 7
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain/.gitignore
  16. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.dll
  17. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.csprojAssemblyReference.cache
  18. 7
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.EntityFrameworkCore/.gitignore
  19. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.EntityFrameworkCore/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.dll
  20. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.EntityFrameworkCore/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.EntityFrameworkCore.csprojAssemblyReference.cache
  21. 7
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/.gitignore
  22. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.HttpApi.Client.dll
  23. 1
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.HttpApi.Client.csproj.CoreCompileInputs.cache
  24. 1
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.HttpApi.Client.csproj.FileListAbsolute.txt
  25. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.HttpApi.Client.csprojAssemblyReference.cache
  26. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.HttpApi.Client.dll
  27. 2
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/obj/LINGYUN.ApiGateway.HttpApi.Client.csproj.nuget.g.props
  28. 7
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi/.gitignore
  29. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi/bin/Debug/netcoreapp3.1/LINGYUN.ApiGateway.Application.Contracts.dll
  30. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi/bin/Debug/netcoreapp3.1/LINGYUN.ApiGateway.Domain.Shared.dll
  31. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi/obj/Debug/netcoreapp3.1/LINGYUN.ApiGateway.HttpApi.csprojAssemblyReference.cache
  32. 7
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/.gitignore
  33. 23
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN.IdentityServer.Application.Contracts.csproj
  34. 29
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/AbpIdentityServerApplicationContractsModule.cs
  35. 10
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/AbpIdentityServerConsts.cs
  36. 25
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/AbpIdentityServerErrorConsts.cs
  37. 33
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/AbpIdentityServerPermissionDefinitionProvider.cs
  38. 25
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/AbpIdentityServerPermissions.cs
  39. 20
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientClaimCreateDto.cs
  40. 9
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientClaimDto.cs
  41. 16
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientClaimGetByKeyInputDto.cs
  42. 20
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientClaimUpdateDto.cs
  43. 9
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientCorsOriginDto.cs
  44. 26
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientCreateDto.cs
  45. 113
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientDto.cs
  46. 11
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientGetByIdInputDto.cs
  47. 8
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientGetByPagedInputDto.cs
  48. 9
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientGrantTypeDto.cs
  49. 9
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientIdPRestrictionDto.cs
  50. 9
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPostLogoutRedirectUriDto.cs
  51. 20
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyCreateDto.cs
  52. 11
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyDto.cs
  53. 16
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyGetByKeyDto.cs
  54. 20
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyUpdateDto.cs
  55. 9
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientRedirectUriDto.cs
  56. 9
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientScopeDto.cs
  57. 25
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretCreateDto.cs
  58. 7
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretDto.cs
  59. 16
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretGetByTypeDto.cs
  60. 25
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretUpdateDto.cs
  61. 125
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientUpdateDto.cs
  62. 37
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/IClientAppService.cs
  63. 17
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Localization/Resources/en.json
  64. 17
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Localization/Resources/zh-Hans.json
  65. 16
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/SecretBaseDto.cs
  66. 7
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application/.gitignore
  67. 16
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application/LINGYUN.IdentityServer.Application.csproj
  68. 13
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerAppServiceBase.cs
  69. 25
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerApplicationModule.cs
  70. 23
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerAutoMapperProfile.cs
  71. 310
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application/LINGYUN/Abp/IdentityServer/Clients/ClientAppService.cs
  72. 7
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.HttpApi/.gitignore
  73. 16
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.HttpApi/LINGYUN.IdentityServer.HttpApi.csproj
  74. 21
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/AbpIdentityServerHttpApiModule.cs
  75. 116
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/Clients/ClientController.cs
  76. 7
      aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application.Contracts/.gitignore
  77. BIN
      aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.Abp.PermissionManagement.Application.Contracts.csprojAssemblyReference.cache
  78. 7
      aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/.gitignore
  79. BIN
      aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/bin/Debug/netstandard2.0/LINGYUN.Abp.PermissionManagement.Application.dll
  80. BIN
      aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/bin/Debug/netstandard2.0/LINGYUN.Abp.PermissionManagement.Application.pdb
  81. BIN
      aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/obj/Debug/netstandard2.0/LINGYUN.Abp.PermissionManagement.Application.csprojAssemblyReference.cache
  82. BIN
      aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/obj/Debug/netstandard2.0/LINGYUN.Abp.PermissionManagement.Application.dll
  83. BIN
      aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/obj/Debug/netstandard2.0/LINGYUN.Abp.PermissionManagement.Application.pdb
  84. 2
      aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/obj/LINGYUN.Abp.PermissionManagement.Application.csproj.nuget.g.props
  85. 7
      aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Domain/.gitignore
  86. 7
      aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/.gitignore
  87. BIN
      aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.Abp.SettingManagement.Application.Contracts.csprojAssemblyReference.cache
  88. 7
      aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/.gitignore
  89. BIN
      aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/obj/Debug/netstandard2.0/LINGYUN.Abp.SettingManagement.Application.csprojAssemblyReference.cache
  90. 7
      aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/.gitignore
  91. BIN
      aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/obj/Debug/netcoreapp3.1/LINGYUN.Abp.SettingManagement.HttpApi.csprojAssemblyReference.cache
  92. 10
      aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs
  93. 2
      aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj
  94. 133
      vueJs/src/api/clients.ts
  95. 27
      vueJs/src/api/types.ts
  96. 203
      vueJs/src/components/InputTagEx/index.vue
  97. 32
      vueJs/src/lang/zh.ts
  98. 27
      vueJs/src/router/index.ts
  99. 12
      vueJs/src/utils/request.ts
  100. 5
      vueJs/src/views/admin/apigateway/components/RouteCreateOrEditForm.vue

7
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/.gitignore

@ -0,0 +1,7 @@
bin
obj
Logs
appsettings.*.json
node_modules
yarn.lock
package-lock.json

1
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.csproj.CoreCompileInputs.cache

@ -1 +0,0 @@
05d2e1f53650cb86c4348471113d51741fb76ff0

1
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.csproj.FileListAbsolute.txt

@ -20,4 +20,3 @@ D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.csproj.CopyComplete
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.dll
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.pdb
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.csproj.CoreCompileInputs.cache

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.csprojAssemblyReference.cache

Binary file not shown.

2
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/LINGYUN.ApiGateway.Application.Contracts.csproj.nuget.g.props

@ -7,7 +7,7 @@
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\iVarKey\.nuget\packages\;D:\Microsoft\Xamarin\NuGet\;C:\Program Files (x86)\dotnet\sdk\NuGetFallbackFolder</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.4.0</NuGetToolVersion>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.5.0</NuGetToolVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>

7
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/.gitignore

@ -0,0 +1,7 @@
bin
obj
Logs
appsettings.*.json
node_modules
yarn.lock
package-lock.json

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.dll

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.dll

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.csprojAssemblyReference.cache

Binary file not shown.

7
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain.Shared/.gitignore

@ -0,0 +1,7 @@
bin
obj
Logs
appsettings.*.json
node_modules
yarn.lock
package-lock.json

1
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain.Shared/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.csproj.CoreCompileInputs.cache

@ -1 +0,0 @@
061f3f9088fee775a74c51e73c470d50ddb271db

1
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain.Shared/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.csproj.FileListAbsolute.txt

@ -14,4 +14,3 @@ D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Domain.Shared\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Domain.Shared.AssemblyInfo.cs
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Domain.Shared\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Domain.Shared.dll
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Domain.Shared\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Domain.Shared.pdb
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Domain.Shared\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Domain.Shared.csproj.CoreCompileInputs.cache

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain.Shared/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.csprojAssemblyReference.cache

Binary file not shown.

2
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain.Shared/obj/LINGYUN.ApiGateway.Domain.Shared.csproj.nuget.g.props

@ -7,7 +7,7 @@
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\iVarKey\.nuget\packages\;D:\Microsoft\Xamarin\NuGet\;C:\Program Files (x86)\dotnet\sdk\NuGetFallbackFolder</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.4.0</NuGetToolVersion>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.5.0</NuGetToolVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>

7
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain/.gitignore

@ -0,0 +1,7 @@
bin
obj
Logs
appsettings.*.json
node_modules
yarn.lock
package-lock.json

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.dll

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.csprojAssemblyReference.cache

Binary file not shown.

7
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.EntityFrameworkCore/.gitignore

@ -0,0 +1,7 @@
bin
obj
Logs
appsettings.*.json
node_modules
yarn.lock
package-lock.json

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.EntityFrameworkCore/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.dll

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.EntityFrameworkCore/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.EntityFrameworkCore.csprojAssemblyReference.cache

Binary file not shown.

7
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/.gitignore

@ -0,0 +1,7 @@
bin
obj
Logs
appsettings.*.json
node_modules
yarn.lock
package-lock.json

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.HttpApi.Client.dll

Binary file not shown.

1
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.HttpApi.Client.csproj.CoreCompileInputs.cache

@ -1 +0,0 @@
5b7167ef84bb508f25e00864dde6d86ec3356ce7

1
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.HttpApi.Client.csproj.FileListAbsolute.txt

@ -20,7 +20,6 @@ D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.HttpApi.Client\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.pdb
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.HttpApi.Client\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Domain.Shared.pdb
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.HttpApi.Client\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.HttpApi.Client.csprojAssemblyReference.cache
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.HttpApi.Client\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.HttpApi.Client.csproj.CoreCompileInputs.cache
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.HttpApi.Client\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.HttpApi.Client.AssemblyInfoInputs.cache
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.HttpApi.Client\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.HttpApi.Client.AssemblyInfo.cs
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.HttpApi.Client\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.HttpApi.Client.csproj.CopyComplete

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.HttpApi.Client.csprojAssemblyReference.cache

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.HttpApi.Client.dll

Binary file not shown.

2
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/obj/LINGYUN.ApiGateway.HttpApi.Client.csproj.nuget.g.props

@ -7,7 +7,7 @@
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\iVarKey\.nuget\packages\;D:\Microsoft\Xamarin\NuGet\;C:\Program Files (x86)\dotnet\sdk\NuGetFallbackFolder</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.5.0</NuGetToolVersion>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.4.0</NuGetToolVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>

7
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi/.gitignore

@ -0,0 +1,7 @@
bin
obj
Logs
appsettings.*.json
node_modules
yarn.lock
package-lock.json

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi/bin/Debug/netcoreapp3.1/LINGYUN.ApiGateway.Application.Contracts.dll

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi/bin/Debug/netcoreapp3.1/LINGYUN.ApiGateway.Domain.Shared.dll

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi/obj/Debug/netcoreapp3.1/LINGYUN.ApiGateway.HttpApi.csprojAssemblyReference.cache

Binary file not shown.

7
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/.gitignore

@ -0,0 +1,7 @@
bin
obj
Logs
appsettings.*.json
node_modules
yarn.lock
package-lock.json

23
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN.IdentityServer.Application.Contracts.csproj

@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<None Remove="LINGYUN\Abp\IdentityServer\Localization\Resources\en.json" />
<None Remove="LINGYUN\Abp\IdentityServer\Localization\Resources\zh-Hans.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="LINGYUN\Abp\IdentityServer\Localization\Resources\en.json" />
<EmbeddedResource Include="LINGYUN\Abp\IdentityServer\Localization\Resources\zh-Hans.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application" Version="2.7.0" />
<PackageReference Include="Volo.Abp.IdentityServer.Domain.Shared" Version="2.7.0" />
</ItemGroup>
</Project>

29
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/AbpIdentityServerApplicationContractsModule.cs

@ -0,0 +1,29 @@
using Volo.Abp.Application;
using Volo.Abp.IdentityServer;
using Volo.Abp.IdentityServer.Localization;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace LINGYUN.Abp.IdentityServer
{
[DependsOn(new[] { typeof(AbpDddApplicationModule) })]
[DependsOn(new[] { typeof(AbpIdentityServerDomainSharedModule) })]
public class AbpIdentityServerApplicationContractsModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<AbpIdentityServerApplicationContractsModule>();
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<AbpIdentityServerResource>()
.AddVirtualJson("/LINGYUN/Abp/IdentityServer/Localization/Resources");
});
}
}
}

10
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/AbpIdentityServerConsts.cs

@ -0,0 +1,10 @@
namespace LINGYUN.Abp.IdentityServer
{
public class AbpIdentityServerConsts
{
/// <summary>
/// 远程服务名称
/// </summary>
public const string RemoteServiceName = "IdentityServer";
}
}

25
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/AbpIdentityServerErrorConsts.cs

@ -0,0 +1,25 @@
namespace LINGYUN.Abp.IdentityServer
{
public class AbpIdentityServerErrorConsts
{
/// <summary>
/// 客户端标识已经存在
/// </summary>
public const string ClientIdExisted = "ClientIdExisted";
/// <summary>
/// 客户端声明不存在
/// </summary>
public const string ClientClaimNotFound = "ClientClaimNotFound";
/// <summary>
/// 客户端密钥不存在
/// </summary>
public const string ClientSecretNotFound = "ClientSecretNotFound";
/// <summary>
/// 客户端属性不存在
/// </summary>
public const string ClientPropertyNotFound = "ClientPropertyNotFound";
}
}

33
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/AbpIdentityServerPermissionDefinitionProvider.cs

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Text;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.IdentityServer.Localization;
using Volo.Abp.Localization;
namespace LINGYUN.Abp.IdentityServer
{
public class AbpIdentityServerPermissionDefinitionProvider : PermissionDefinitionProvider
{
public override void Define(IPermissionDefinitionContext context)
{
var identityServerGroup = context.AddGroup(AbpIdentityServerPermissions.GroupName, L("Permissions:IdentityServer"));
var clientPermissions = identityServerGroup.AddPermission(AbpIdentityServerPermissions.Clients.Default, L("Permissions:Clients"));
clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Create, L("Permissions:Create"));
clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Update, L("Permissions:Update"));
clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Enabled, L("Permissions:Enabled"));
clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Disabled, L("Permissions:Disabled"));
clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Delete, L("Permissions:Delete"));
var clientClaimPermissiosn = clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Claims.Default, L("Permissions:Clients:Claims"));
clientClaimPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Claims.Create, L("Permissions:Create"));
clientClaimPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Claims.Update, L("Permissions:Update"));
clientClaimPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Claims.Delete, L("Permissions:Delete"));
}
protected virtual LocalizableString L(string name)
{
return LocalizableString.Create<AbpIdentityServerResource>(name);
}
}
}

25
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/AbpIdentityServerPermissions.cs

@ -0,0 +1,25 @@
namespace LINGYUN.Abp.IdentityServer
{
public class AbpIdentityServerPermissions
{
public const string GroupName = "IdentityServer";
public static class Clients
{
public const string Default = GroupName + ".Clients";
public const string Create = Default + ".Create";
public const string Update = Default + ".Update";
public const string Delete = Default + ".Delete";
public const string Enabled = Default + ".Enabled";
public const string Disabled = Default + ".Disabled";
public static class Claims
{
public const string Default = Clients.Default + ".Claims";
public const string Create = Default + ".Create";
public const string Update = Default + ".Update";
public const string Delete = Default + ".Delete";
}
}
}
}

20
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientClaimCreateDto.cs

@ -0,0 +1,20 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer.Clients;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientClaimCreateDto
{
[Required]
public Guid ClientId { get; set; }
[Required]
[StringLength(ClientClaimConsts.TypeMaxLength)]
public string Type { get; set; }
[Required]
[StringLength(ClientClaimConsts.ValueMaxLength)]
public string Value { get; set; }
}
}

9
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientClaimDto.cs

@ -0,0 +1,9 @@
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientClaimDto
{
public string Type { get; set; }
public string Value { get; set; }
}
}

16
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientClaimGetByKeyInputDto.cs

@ -0,0 +1,16 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer.Clients;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientClaimGetByKeyInputDto
{
[Required]
public Guid ClientId { get; set; }
[Required]
[StringLength(ClientClaimConsts.TypeMaxLength)]
public string Type { get; set; }
}
}

20
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientClaimUpdateDto.cs

@ -0,0 +1,20 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer.Clients;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientClaimUpdateDto
{
[Required]
public Guid ClientId { get; set; }
[Required]
[StringLength(ClientClaimConsts.TypeMaxLength)]
public string Type { get; set; }
[Required]
[StringLength(ClientClaimConsts.ValueMaxLength)]
public string Value { get; set; }
}
}

9
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientCorsOriginDto.cs

@ -0,0 +1,9 @@
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientCorsOriginDto : EntityDto
{
public string Origin { get; set; }
}
}

26
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientCreateDto.cs

@ -0,0 +1,26 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer.Clients;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientCreateDto
{
[Required]
[StringLength(ClientConsts.ClientIdMaxLength)]
public string ClientId { get; set; }
[Required]
[StringLength(ClientConsts.ClientNameMaxLength)]
public string ClientName { get; set; }
[StringLength(ClientConsts.DescriptionMaxLength)]
public string Description { get; set; }
public List<ClientGrantTypeDto> AllowedGrantTypes { get; set; }
public ClientCreateDto()
{
AllowedGrantTypes = new List<ClientGrantTypeDto>();
}
}
}

113
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientDto.cs

@ -0,0 +1,113 @@
using System;
using System.Collections.Generic;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientDto : FullAuditedEntityDto<Guid>
{
public string ClientId { get; set; }
public string ClientName { get; set; }
public string Description { get; set; }
public string ClientUri { get; set; }
public string LogoUri { get; set; }
public bool Enabled { get; set; }
public string ProtocolType { get; set; }
public bool RequireClientSecret { get; set; }
public bool RequireConsent { get; set; }
public bool AllowRememberConsent { get; set; }
public bool AlwaysIncludeUserClaimsInIdToken { get; set; }
public bool RequirePkce { get; set; }
public bool AllowPlainTextPkce { get; set; }
public bool AllowAccessTokensViaBrowser { get; set; }
public string FrontChannelLogoutUri { get; set; }
public bool FrontChannelLogoutSessionRequired { get; set; }
public string BackChannelLogoutUri { get; set; }
public bool BackChannelLogoutSessionRequired { get; set; }
public bool AllowOfflineAccess { get; set; }
public int IdentityTokenLifetime { get; set; }
public int AccessTokenLifetime { get; set; }
public int AuthorizationCodeLifetime { get; set; }
public int? ConsentLifetime { get; set; }
public int AbsoluteRefreshTokenLifetime { get; set; }
public int SlidingRefreshTokenLifetime { get; set; }
public int RefreshTokenUsage { get; set; }
public bool UpdateAccessTokenClaimsOnRefresh { get; set; }
public int RefreshTokenExpiration { get; set; }
public int AccessTokenType { get; set; }
public bool EnableLocalLogin { get; set; }
public bool IncludeJwtId { get; set; }
public bool AlwaysSendClientClaims { get; set; }
public string ClientClaimsPrefix { get; set; }
public string PairWiseSubjectSalt { get; set; }
public int? UserSsoLifetime { get; set; }
public string UserCodeType { get; set; }
public int DeviceCodeLifetime { get; set; }
public List<ClientScopeDto> AllowedScopes { get; set; }
public List<ClientSecretDto> ClientSecrets { get; set; }
public List<ClientGrantTypeDto> AllowedGrantTypes { get; set; }
public List<ClientCorsOriginDto> AllowedCorsOrigins { get; set; }
public List<ClientRedirectUriDto> RedirectUris { get; set; }
public List<ClientPostLogoutRedirectUriDto> PostLogoutRedirectUris { get; set; }
public List<ClientIdPRestrictionDto> IdentityProviderRestrictions { get; set; }
public List<ClientClaimDto> Claims { get; set; }
public List<ClientPropertyDto> Properties { get; set; }
public ClientDto()
{
Claims = new List<ClientClaimDto>();
Properties = new List<ClientPropertyDto>();
AllowedScopes = new List<ClientScopeDto>();
ClientSecrets = new List<ClientSecretDto>();
RedirectUris = new List<ClientRedirectUriDto>();
AllowedGrantTypes = new List<ClientGrantTypeDto>();
AllowedCorsOrigins = new List<ClientCorsOriginDto>();
PostLogoutRedirectUris = new List<ClientPostLogoutRedirectUriDto>();
IdentityProviderRestrictions = new List<ClientIdPRestrictionDto>();
}
}
}

11
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientGetByIdInputDto.cs

@ -0,0 +1,11 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientGetByIdInputDto
{
[Required]
public Guid Id { get; set; }
}
}

8
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientGetByPagedInputDto.cs

@ -0,0 +1,8 @@
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientGetByPagedInputDto : PagedAndSortedResultRequestDto
{
}
}

9
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientGrantTypeDto.cs

@ -0,0 +1,9 @@
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientGrantTypeDto : EntityDto
{
public string GrantType { get; set; }
}
}

9
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientIdPRestrictionDto.cs

@ -0,0 +1,9 @@
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientIdPRestrictionDto : EntityDto
{
public string Provider { get; set; }
}
}

9
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPostLogoutRedirectUriDto.cs

@ -0,0 +1,9 @@
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientPostLogoutRedirectUriDto : EntityDto
{
public string PostLogoutRedirectUri { get; set; }
}
}

20
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyCreateDto.cs

@ -0,0 +1,20 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer.Clients;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientPropertyCreateDto
{
[Required]
public Guid ClientId { get; set; }
[Required]
[StringLength(ClientPropertyConsts.KeyMaxLength)]
public string Key { get; set; }
[Required]
[StringLength(ClientPropertyConsts.ValueMaxLength)]
public string Value { get; set; }
}
}

11
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyDto.cs

@ -0,0 +1,11 @@
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientPropertyDto : EntityDto
{
public string Key { get; set; }
public string Value { get; set; }
}
}

16
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyGetByKeyDto.cs

@ -0,0 +1,16 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer.Clients;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientPropertyGetByKeyDto
{
[Required]
public Guid ClientId { get; set; }
[Required]
[StringLength(ClientPropertyConsts.KeyMaxLength)]
public string Key { get; set; }
}
}

20
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyUpdateDto.cs

@ -0,0 +1,20 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer.Clients;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientPropertyUpdateDto
{
[Required]
public Guid ClientId { get; set; }
[Required]
[StringLength(ClientPropertyConsts.KeyMaxLength)]
public string Key { get; set; }
[Required]
[StringLength(ClientPropertyConsts.ValueMaxLength)]
public string Value { get; set; }
}
}

9
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientRedirectUriDto.cs

@ -0,0 +1,9 @@
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientRedirectUriDto : EntityDto
{
public string RedirectUri { get; set; }
}
}

9
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientScopeDto.cs

@ -0,0 +1,9 @@
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientScopeDto : EntityDto
{
public string Scope { get; set; }
}
}

25
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretCreateDto.cs

@ -0,0 +1,25 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientSecretCreateDto
{
[Required]
public Guid ClientId { get; set; }
[Required]
[StringLength(SecretConsts.TypeMaxLength)]
public string Type { get; set; }
[Required]
[StringLength(SecretConsts.ValueMaxLength)]
public string Value { get; set; }
[StringLength(SecretConsts.DescriptionMaxLength)]
public string Description { get; set; }
public DateTime? Expiration { get; set; }
}
}

7
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretDto.cs

@ -0,0 +1,7 @@
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientSecretDto : SecretBaseDto
{
}
}

16
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretGetByTypeDto.cs

@ -0,0 +1,16 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientSecretGetByTypeDto
{
[Required]
public Guid ClientId { get; set; }
[Required]
[StringLength(SecretConsts.TypeMaxLength)]
public string Type { get; set; }
}
}

25
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretUpdateDto.cs

@ -0,0 +1,25 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientSecretUpdateDto
{
[Required]
public Guid ClientId { get; set; }
[Required]
[StringLength(SecretConsts.TypeMaxLength)]
public string Type { get; set; }
[Required]
[StringLength(SecretConsts.ValueMaxLength)]
public string Value { get; set; }
[StringLength(SecretConsts.DescriptionMaxLength)]
public string Description { get; set; }
public DateTime? Expiration { get; set; }
}
}

125
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientUpdateDto.cs

@ -0,0 +1,125 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer.Clients;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientUpdateDto
{
[Required]
public Guid Id { get; set; }
[Required]
[StringLength(1000)]
public string ConcurrencyStamp { get; set; }
[StringLength(ClientConsts.ClientIdMaxLength)]
public string ClientId { get; set; }
[StringLength(ClientConsts.ClientNameMaxLength)]
public string ClientName { get; set; }
[StringLength(ClientConsts.DescriptionMaxLength)]
public string Description { get; set; }
[StringLength(ClientConsts.ClientUriMaxLength)]
public string ClientUri { get; set; }
[StringLength(ClientConsts.LogoUriMaxLength)]
public string LogoUri { get; set; }
public bool? Enabled { get; set; }
[StringLength(ClientConsts.ProtocolTypeMaxLength)]
public string ProtocolType { get; set; }
public bool? RequireClientSecret { get; set; }
public bool? RequireConsent { get; set; }
public bool? AllowRememberConsent { get; set; }
public bool? AlwaysIncludeUserClaimsInIdToken { get; set; }
public bool? RequirePkce { get; set; }
public bool? AllowPlainTextPkce { get; set; }
public bool? AllowAccessTokensViaBrowser { get; set; }
[StringLength(ClientConsts.FrontChannelLogoutUriMaxLength)]
public string FrontChannelLogoutUri { get; set; }
public bool? FrontChannelLogoutSessionRequired { get; set; }
[StringLength(ClientConsts.BackChannelLogoutUriMaxLength)]
public string BackChannelLogoutUri { get; set; }
public bool? BackChannelLogoutSessionRequired { get; set; }
public bool? AllowOfflineAccess { get; set; }
public int? IdentityTokenLifetime { get; set; }
public int? AccessTokenLifetime { get; set; }
public int? AuthorizationCodeLifetime { get; set; }
public int? ConsentLifetime { get; set; }
public int? AbsoluteRefreshTokenLifetime { get; set; }
public int? SlidingRefreshTokenLifetime { get; set; }
public int? RefreshTokenUsage { get; set; }
public bool? UpdateAccessTokenClaimsOnRefresh { get; set; }
public int? RefreshTokenExpiration { get; set; }
public int? AccessTokenType { get; set; }
public bool? EnableLocalLogin { get; set; }
public bool? IncludeJwtId { get; set; }
public bool? AlwaysSendClientClaims { get; set; }
[StringLength(ClientConsts.ClientClaimsPrefixMaxLength)]
public string ClientClaimsPrefix { get; set; }
[StringLength(ClientConsts.PairWiseSubjectSaltMaxLength)]
public string PairWiseSubjectSalt { get; set; }
public int? UserSsoLifetime { get; set; }
[StringLength(ClientConsts.UserCodeTypeMaxLength)]
public string UserCodeType { get; set; }
public int? DeviceCodeLifetime { get; set; }
public List<ClientScopeDto> AllowedScopes { get; set; }
public List<ClientGrantTypeDto> AllowedGrantTypes { get; set; }
public List<ClientCorsOriginDto> AllowedCorsOrigins { get; set; }
public List<ClientRedirectUriDto> RedirectUris { get; set; }
public List<ClientPostLogoutRedirectUriDto> PostLogoutRedirectUris { get; set; }
public List<ClientIdPRestrictionDto> IdentityProviderRestrictions { get; set; }
public ClientUpdateDto()
{
Enabled = true;
DeviceCodeLifetime = 300;
AllowedScopes = new List<ClientScopeDto>();
RedirectUris = new List<ClientRedirectUriDto>();
AllowedGrantTypes = new List<ClientGrantTypeDto>();
AllowedCorsOrigins = new List<ClientCorsOriginDto>();
PostLogoutRedirectUris = new List<ClientPostLogoutRedirectUriDto>();
IdentityProviderRestrictions = new List<ClientIdPRestrictionDto>();
}
}
}

37
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/IClientAppService.cs

@ -0,0 +1,37 @@
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public interface IClientAppService : IApplicationService
{
Task<ClientDto> GetAsync(ClientGetByIdInputDto clientGetById);
Task<PagedResultDto<ClientDto>> GetAsync(ClientGetByPagedInputDto clientGetByPaged);
Task<ClientDto> CreateAsync(ClientCreateDto clientCreate);
Task<ClientDto> UpdateAsync(ClientUpdateDto clientUpdate);
Task DeleteAsync(ClientGetByIdInputDto clientGetByIdInput);
Task<ClientClaimDto> AddClaimAsync(ClientClaimCreateDto clientClaimCreate);
Task<ClientClaimDto> UpdateClaimAsync(ClientClaimUpdateDto clientClaimUpdate);
Task DeleteClaimAsync(ClientClaimGetByKeyInputDto clientClaimGetByKey);
Task<ClientPropertyDto> AddPropertyAsync(ClientPropertyCreateDto clientPropertyCreate);
Task<ClientPropertyDto> UpdatePropertyAsync(ClientPropertyUpdateDto clientPropertyUpdate);
Task DeletePropertyAsync(ClientPropertyGetByKeyDto clientPropertyGetByKey);
Task<ClientSecretDto> AddSecretAsync(ClientSecretCreateDto clientSecretCreate);
Task<ClientSecretDto> UpdateSecretAsync(ClientSecretUpdateDto clientSecretUpdate);
Task DeleteSecretAsync(ClientSecretGetByTypeDto clientSecretGetByType);
}
}

17
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Localization/Resources/en.json

@ -0,0 +1,17 @@
{
"culture": "en",
"texts": {
"Permission:IdentityServer": "IdentityServer",
"Permissions:Create": "Create",
"Permissions:Update": "Update",
"Permissions:Enabled": "Enabled",
"Permissions:Disabled": "Disabled",
"Permissions:Delete": "Delete",
"Permissions:Clients": "Clients",
"Permissions:Clients:Claims": "Client claim",
"ClientIdExisted": "Client id: {0} already exists!",
"ClientClaimNotFound": "Client claim: {0} not found!",
"ClientSecretNotFound": "Client secret: {0} not found!",
"ClientPropertyNotFound": "Client property: {0} not found!"
}
}

17
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Localization/Resources/zh-Hans.json

@ -0,0 +1,17 @@
{
"culture": "zh-Hans",
"texts": {
"Permission:IdentityServer": "IdentityServer管理",
"Permissions:Create": "新增",
"Permissions:Update": "修改",
"Permissions:Enabled": "启用",
"Permissions:Disabled": "停用",
"Permissions:Delete": "删除",
"Permissions:Clients": "客户端管理",
"Permissions:Clients:Claims": "客户端声明",
"ClientIdExisted": "客户端标识: {0} 已经存在!",
"ClientClaimNotFound": "客户端声明: {0} 不存在!",
"ClientSecretNotFound": "客户端密钥: {0} 不存在!",
"ClientPropertyNotFound": "客户端属性: {0} 不存在!"
}
}

16
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/SecretBaseDto.cs

@ -0,0 +1,16 @@
using System;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.IdentityServer
{
public abstract class SecretBaseDto : EntityDto
{
public string Type { get; set; }
public string Value { get; set; }
public string Description { get; set; }
public DateTime? Expiration { get; set; }
}
}

7
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application/.gitignore

@ -0,0 +1,7 @@
bin
obj
Logs
appsettings.*.json
node_modules
yarn.lock
package-lock.json

16
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application/LINGYUN.IdentityServer.Application.csproj

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.IdentityServer.Domain" Version="2.7.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LINGYUN.IdentityServer.Application.Contracts\LINGYUN.IdentityServer.Application.Contracts.csproj" />
</ItemGroup>
</Project>

13
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerAppServiceBase.cs

@ -0,0 +1,13 @@
using Volo.Abp.Application.Services;
using Volo.Abp.IdentityServer.Localization;
namespace LINGYUN.Abp.IdentityServer
{
public abstract class AbpIdentityServerAppServiceBase : ApplicationService
{
protected AbpIdentityServerAppServiceBase()
{
LocalizationResource = typeof(AbpIdentityServerResource);
}
}
}

25
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerApplicationModule.cs

@ -0,0 +1,25 @@
using Volo.Abp.AutoMapper;
using Volo.Abp.IdentityServer;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.IdentityServer
{
[DependsOn(
typeof(AbpIdentityServerDomainModule),
typeof(AbpIdentityServerApplicationContractsModule),
typeof(AbpAutoMapperModule)
)]
public class AbpIdentityServerApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpAutoMapperOptions>(options =>
{
options.Configurators.Add(ctx =>
{
ctx.MapperConfiguration.AddProfile<AbpIdentityServerAutoMapperProfile>();
});
});
}
}
}

23
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerAutoMapperProfile.cs

@ -0,0 +1,23 @@
using AutoMapper;
using LINGYUN.Abp.IdentityServer.Clients;
using Volo.Abp.IdentityServer.Clients;
namespace LINGYUN.Abp.IdentityServer
{
public class AbpIdentityServerAutoMapperProfile : Profile
{
public AbpIdentityServerAutoMapperProfile()
{
CreateMap<ClientSecret, ClientSecretDto>();
CreateMap<ClientClaim, ClientClaimDto>();
CreateMap<ClientCorsOrigin, ClientCorsOriginDto>();
CreateMap<ClientGrantType, ClientGrantTypeDto>();
CreateMap<ClientIdPRestriction, ClientIdPRestrictionDto>();
CreateMap<ClientPostLogoutRedirectUri, ClientPostLogoutRedirectUriDto>();
CreateMap<ClientProperty, ClientPropertyDto>();
CreateMap<ClientRedirectUri, ClientRedirectUriDto>();
CreateMap<ClientScope, ClientScopeDto>();
CreateMap<Client, ClientDto>();
}
}
}

310
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application/LINGYUN/Abp/IdentityServer/Clients/ClientAppService.cs

@ -0,0 +1,310 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.IdentityServer.Clients;
using Volo.Abp.Security.Encryption;
namespace LINGYUN.Abp.IdentityServer.Clients
{
public class ClientAppService : AbpIdentityServerAppServiceBase, IClientAppService
{
private IStringEncryptionService _encryptionService;
protected IStringEncryptionService EncryptionService => LazyGetRequiredService(ref _encryptionService);
protected IClientRepository ClientRepository { get; }
public ClientAppService(IClientRepository clientRepository)
{
ClientRepository = clientRepository;
}
public virtual async Task<ClientClaimDto> AddClaimAsync(ClientClaimCreateDto clientClaimCreate)
{
var client = await ClientRepository.GetAsync(clientClaimCreate.ClientId);
client.AddClaim(clientClaimCreate.Value, clientClaimCreate.Type);
var clientClaim = client.FindClaim(clientClaimCreate.Value, clientClaimCreate.Type);
return ObjectMapper.Map<ClientClaim, ClientClaimDto>(clientClaim);
}
public virtual async Task<ClientPropertyDto> AddPropertyAsync(ClientPropertyCreateDto clientPropertyCreate)
{
var client = await ClientRepository.GetAsync(clientPropertyCreate.ClientId);
client.AddProperty(clientPropertyCreate.Key, clientPropertyCreate.Value);
var clientProperty = client.FindProperty(clientPropertyCreate.Key, clientPropertyCreate.Value);
return ObjectMapper.Map<ClientProperty, ClientPropertyDto>(clientProperty);
}
public virtual async Task<ClientSecretDto> AddSecretAsync(ClientSecretCreateDto clientSecretCreate)
{
var client = await ClientRepository.GetAsync(clientSecretCreate.ClientId);
var clientSecretValue = EncryptionService.Encrypt(clientSecretCreate.Value);
client.AddSecret(clientSecretValue, clientSecretCreate.Expiration,
clientSecretCreate.Type, clientSecretCreate.Description);
var clientSecret = client.FindSecret(clientSecretValue, clientSecretCreate.Type);
return ObjectMapper.Map<ClientSecret, ClientSecretDto>(clientSecret);
}
public virtual async Task<ClientDto> CreateAsync(ClientCreateDto clientCreate)
{
var clientIdExists = await ClientRepository.CheckClientIdExistAsync(clientCreate.ClientId);
if(clientIdExists)
{
throw new UserFriendlyException(L[AbpIdentityServerErrorConsts.ClientIdExisted, clientCreate.ClientId]);
}
var client = new Client(GuidGenerator.Create(), clientCreate.ClientId);
client.ClientName = clientCreate.ClientName;
client.Description = clientCreate.Description;
foreach(var grantType in clientCreate.AllowedGrantTypes)
{
client.AddGrantType(grantType.GrantType);
}
client = await ClientRepository.InsertAsync(client, true);
return ObjectMapper.Map<Client, ClientDto>(client);
}
public virtual async Task DeleteAsync(ClientGetByIdInputDto clientGetByIdInput)
{
await ClientRepository.DeleteAsync(clientGetByIdInput.Id);
}
public virtual async Task DeleteClaimAsync(ClientClaimGetByKeyInputDto clientClaimGetByKey)
{
var client = await ClientRepository.GetAsync(clientClaimGetByKey.ClientId);
client.Claims.RemoveAll(claim => claim.Type.Equals(clientClaimGetByKey.Type));
}
public virtual async Task DeletePropertyAsync(ClientPropertyGetByKeyDto clientPropertyGetByKey)
{
var client = await ClientRepository.GetAsync(clientPropertyGetByKey.ClientId);
client.Properties.RemoveAll(property => property.Key.Equals(clientPropertyGetByKey.Key));
}
public virtual async Task DeleteSecretAsync(ClientSecretGetByTypeDto clientSecretGetByType)
{
var client = await ClientRepository.GetAsync(clientSecretGetByType.ClientId);
client.ClientSecrets.RemoveAll(secret => secret.Type.Equals(clientSecretGetByType.Type));
}
public virtual async Task<ClientDto> GetAsync(ClientGetByIdInputDto clientGetById)
{
var client = await ClientRepository.GetAsync(clientGetById.Id);
return ObjectMapper.Map<Client, ClientDto>(client);
}
public virtual async Task<PagedResultDto<ClientDto>> GetAsync(ClientGetByPagedInputDto clientGetByPaged)
{
// Abp官方IdentityServer项目不支持Filter过滤...
var clients = await ClientRepository.GetListAsync(clientGetByPaged.Sorting,
clientGetByPaged.SkipCount, clientGetByPaged.MaxResultCount, true);
var clientCount = await ClientRepository.GetCountAsync();
return new PagedResultDto<ClientDto>(clientCount,
ObjectMapper.Map<List<Client>, List<ClientDto>>(clients));
}
public virtual async Task<ClientDto> UpdateAsync(ClientUpdateDto clientUpdate)
{
var client = await ClientRepository.GetAsync(clientUpdate.Id);
#region Basic Property
client.ConcurrencyStamp = clientUpdate.ConcurrencyStamp;
client.ClientId = clientUpdate.ClientId ?? client.ClientId;
client.ClientUri = clientUpdate.ClientUri ?? client.ClientUri;
client.ClientName = clientUpdate.ClientName ?? client.ClientName;
client.AbsoluteRefreshTokenLifetime = clientUpdate.AbsoluteRefreshTokenLifetime
?? client.AbsoluteRefreshTokenLifetime;
client.AccessTokenLifetime = clientUpdate.AccessTokenLifetime
?? client.AccessTokenLifetime;
client.AccessTokenType = clientUpdate.AccessTokenType ?? client.AccessTokenType;
client.AllowAccessTokensViaBrowser = clientUpdate.AllowAccessTokensViaBrowser
?? client.AllowAccessTokensViaBrowser;
client.AllowOfflineAccess = clientUpdate.AllowOfflineAccess
?? client.AllowOfflineAccess;
client.AllowPlainTextPkce = clientUpdate.AllowPlainTextPkce ?? client.AllowPlainTextPkce;
client.AllowRememberConsent = clientUpdate.AllowRememberConsent ?? client.AllowRememberConsent;
client.AlwaysIncludeUserClaimsInIdToken = clientUpdate.AlwaysIncludeUserClaimsInIdToken
?? client.AlwaysIncludeUserClaimsInIdToken;
client.AlwaysSendClientClaims = clientUpdate.AlwaysSendClientClaims ?? client.AlwaysSendClientClaims;
client.AuthorizationCodeLifetime = clientUpdate.AuthorizationCodeLifetime
?? client.AuthorizationCodeLifetime;
client.BackChannelLogoutSessionRequired = clientUpdate.BackChannelLogoutSessionRequired
?? client.BackChannelLogoutSessionRequired;
client.BackChannelLogoutUri = clientUpdate.BackChannelLogoutUri
?? client.BackChannelLogoutUri;
client.ClientClaimsPrefix = clientUpdate.ClientClaimsPrefix ?? client.ClientClaimsPrefix;
client.ConsentLifetime = clientUpdate.ConsentLifetime ?? client.ConsentLifetime;
client.Description = clientUpdate.Description ?? client.Description;
client.DeviceCodeLifetime = clientUpdate.DeviceCodeLifetime ?? client.DeviceCodeLifetime;
client.Enabled = clientUpdate.Enabled ?? client.Enabled;
client.EnableLocalLogin = clientUpdate.EnableLocalLogin ?? client.EnableLocalLogin;
client.FrontChannelLogoutSessionRequired = clientUpdate.FrontChannelLogoutSessionRequired
?? client.FrontChannelLogoutSessionRequired;
client.FrontChannelLogoutUri = clientUpdate.FrontChannelLogoutUri ?? client.FrontChannelLogoutUri;
client.IdentityTokenLifetime = clientUpdate.IdentityTokenLifetime ?? client.IdentityTokenLifetime;
client.IncludeJwtId = clientUpdate.IncludeJwtId ?? client.IncludeJwtId;
client.LogoUri = clientUpdate.LogoUri ?? client.LogoUri;
client.PairWiseSubjectSalt = clientUpdate.PairWiseSubjectSalt ?? client.PairWiseSubjectSalt;
client.ProtocolType = clientUpdate.ProtocolType ?? client.ProtocolType;
client.RefreshTokenExpiration = clientUpdate.RefreshTokenExpiration ?? client.RefreshTokenExpiration;
client.RefreshTokenUsage = clientUpdate.RefreshTokenUsage ?? client.RefreshTokenUsage;
client.RequireClientSecret = clientUpdate.RequireClientSecret ?? client.RequireClientSecret;
client.RequireConsent = clientUpdate.RequireConsent ?? client.RequireConsent;
client.RequirePkce = clientUpdate.RequirePkce ?? client.RequirePkce;
client.SlidingRefreshTokenLifetime = clientUpdate.SlidingRefreshTokenLifetime
?? client.SlidingRefreshTokenLifetime;
client.UpdateAccessTokenClaimsOnRefresh = clientUpdate.UpdateAccessTokenClaimsOnRefresh
?? client.UpdateAccessTokenClaimsOnRefresh;
client.UserCodeType = clientUpdate.UserCodeType ?? client.UserCodeType;
client.UserSsoLifetime = clientUpdate.UserSsoLifetime ?? client.UserSsoLifetime;
#endregion
#region AllowScope
foreach(var scope in clientUpdate.AllowedScopes)
{
var clientScope = client.FindScope(scope.Scope);
if (clientScope == null)
{
client.AddScope(scope.Scope);
}
}
#endregion
#region RedirectUris
foreach(var redirect in clientUpdate.RedirectUris)
{
var clientRedirect = client.FindRedirectUri(redirect.RedirectUri);
if(clientRedirect == null)
{
client.AddRedirectUri(redirect.RedirectUri);
}
}
#endregion
#region AllowedGrantTypes
foreach (var grantType in clientUpdate.AllowedGrantTypes)
{
var clientGrantType = client.FindGrantType(grantType.GrantType);
if (clientGrantType == null)
{
client.AddGrantType(grantType.GrantType);
}
}
#endregion
#region AllowedCorsOrigins
foreach (var corgOrigin in clientUpdate.AllowedCorsOrigins)
{
var clientCorsOrigin = client.FindCorsOrigin(corgOrigin.Origin);
if (clientCorsOrigin == null)
{
client.AddCorsOrigin(corgOrigin.Origin);
}
}
#endregion
#region PostLogoutRedirectUris
foreach (var logoutRedirect in clientUpdate.PostLogoutRedirectUris)
{
var clientLogoutRedirect = client.FindPostLogoutRedirectUri(logoutRedirect.PostLogoutRedirectUri);
if (clientLogoutRedirect == null)
{
client.AddPostLogoutRedirectUri(logoutRedirect.PostLogoutRedirectUri);
}
}
#endregion
#region IdentityProviderRestrictions
foreach (var provider in clientUpdate.IdentityProviderRestrictions)
{
var clientIdentityProvider = client.FindIdentityProviderRestriction(provider.Provider);
if (clientIdentityProvider == null)
{
client.AddIdentityProviderRestriction(provider.Provider);
}
}
#endregion
client = await ClientRepository.UpdateAsync(client, true);
return ObjectMapper.Map<Client, ClientDto>(client);
}
public virtual async Task<ClientClaimDto> UpdateClaimAsync(ClientClaimUpdateDto clientClaimUpdate)
{
var client = await ClientRepository.GetAsync(clientClaimUpdate.ClientId);
var clientClaim = client.Claims.FirstOrDefault(claim => claim.Type.Equals(clientClaimUpdate.Type));
if(clientClaim == null)
{
throw new UserFriendlyException(L[AbpIdentityServerErrorConsts.ClientClaimNotFound, clientClaimUpdate.Type]);
}
clientClaim.Value = clientClaimUpdate.Value;
return ObjectMapper.Map<ClientClaim, ClientClaimDto>(clientClaim);
}
public virtual async Task<ClientPropertyDto> UpdatePropertyAsync(ClientPropertyUpdateDto clientPropertyUpdate)
{
var client = await ClientRepository.GetAsync(clientPropertyUpdate.ClientId);
var clientProperty = client.Properties
.FirstOrDefault(property => property.Key.Equals(clientPropertyUpdate.Key));
if (clientProperty == null)
{
throw new UserFriendlyException(
L[AbpIdentityServerErrorConsts.ClientPropertyNotFound, clientPropertyUpdate.Key]);
}
clientProperty.Value = clientPropertyUpdate.Value;
return ObjectMapper.Map<ClientProperty, ClientPropertyDto>(clientProperty);
}
public virtual async Task<ClientSecretDto> UpdateSecretAsync(ClientSecretUpdateDto clientSecretUpdate)
{
var client = await ClientRepository.GetAsync(clientSecretUpdate.ClientId);
var clientSecret = client.ClientSecrets
.FirstOrDefault(secret => secret.Type.Equals(clientSecretUpdate.Type));
if (clientSecret == null)
{
throw new UserFriendlyException(
L[AbpIdentityServerErrorConsts.ClientSecretNotFound, clientSecretUpdate.Type]);
}
clientSecret.Value = EncryptionService.Encrypt(clientSecretUpdate.Value);
return ObjectMapper.Map<ClientSecret, ClientSecretDto>(clientSecret);
}
}
}

7
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.HttpApi/.gitignore

@ -0,0 +1,7 @@
bin
obj
Logs
appsettings.*.json
node_modules
yarn.lock
package-lock.json

16
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.HttpApi/LINGYUN.IdentityServer.HttpApi.csproj

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="2.7.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LINGYUN.IdentityServer.Application.Contracts\LINGYUN.IdentityServer.Application.Contracts.csproj" />
</ItemGroup>
</Project>

21
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/AbpIdentityServerHttpApiModule.cs

@ -0,0 +1,21 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.IdentityServer
{
[DependsOn(
typeof(AbpIdentityServerApplicationContractsModule),
typeof(AbpAspNetCoreMvcModule)
)]
public class AbpIdentityServerHttpApiModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<IMvcBuilder>(mvcBuilder =>
{
mvcBuilder.AddApplicationPartIfNotExists(typeof(AbpIdentityServerHttpApiModule).Assembly);
});
}
}
}

116
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/Clients/ClientController.cs

@ -0,0 +1,116 @@
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;
namespace LINGYUN.Abp.IdentityServer.Clients
{
[RemoteService(Name = AbpIdentityServerConsts.RemoteServiceName)]
[Area("IdentityServer")]
[Route("api/IdentityServer/Clients")]
public class ClientController : AbpController, IClientAppService
{
protected IClientAppService ClientAppService { get; }
public ClientController(IClientAppService clientAppService)
{
ClientAppService = clientAppService;
}
[HttpPost]
public virtual async Task<ClientDto> CreateAsync(ClientCreateDto clientCreate)
{
return await ClientAppService.CreateAsync(clientCreate);
}
[HttpDelete]
[Route("{Id}")]
public virtual async Task DeleteAsync(ClientGetByIdInputDto clientGetByIdInput)
{
await ClientAppService.DeleteAsync(clientGetByIdInput);
}
[HttpGet]
[Route("{Id}")]
public virtual async Task<ClientDto> GetAsync(ClientGetByIdInputDto clientGetById)
{
return await ClientAppService.GetAsync(clientGetById);
}
[HttpGet]
public virtual async Task<PagedResultDto<ClientDto>> GetAsync(ClientGetByPagedInputDto clientGetByPaged)
{
return await ClientAppService.GetAsync(clientGetByPaged);
}
[HttpPut]
[Route("{Id}")]
public virtual async Task<ClientDto> UpdateAsync(ClientUpdateDto clientUpdate)
{
return await ClientAppService.UpdateAsync(clientUpdate);
}
[HttpPost]
[Route("Claims")]
public virtual async Task<ClientClaimDto> AddClaimAsync(ClientClaimCreateDto clientClaimCreate)
{
return await ClientAppService.AddClaimAsync(clientClaimCreate);
}
[HttpPut]
[Route("Claims")]
public virtual async Task<ClientClaimDto> UpdateClaimAsync(ClientClaimUpdateDto clientClaimUpdate)
{
return await ClientAppService.UpdateClaimAsync(clientClaimUpdate);
}
[HttpDelete]
[Route("Claims")]
public virtual async Task DeleteClaimAsync(ClientClaimGetByKeyInputDto clientClaimGetByKey)
{
await ClientAppService.DeleteClaimAsync(clientClaimGetByKey);
}
[HttpPost]
[Route("Properties")]
public virtual async Task<ClientPropertyDto> AddPropertyAsync(ClientPropertyCreateDto clientPropertyCreate)
{
return await ClientAppService.AddPropertyAsync(clientPropertyCreate);
}
[HttpPut]
[Route("Properties")]
public virtual async Task<ClientPropertyDto> UpdatePropertyAsync(ClientPropertyUpdateDto clientPropertyUpdate)
{
return await ClientAppService.UpdatePropertyAsync(clientPropertyUpdate);
}
[HttpDelete]
[Route("Properties")]
public virtual async Task DeletePropertyAsync(ClientPropertyGetByKeyDto clientPropertyGetByKey)
{
await ClientAppService.DeletePropertyAsync(clientPropertyGetByKey);
}
[HttpPost]
[Route("Secrets")]
public virtual async Task<ClientSecretDto> AddSecretAsync(ClientSecretCreateDto clientSecretCreate)
{
return await ClientAppService.AddSecretAsync(clientSecretCreate);
}
[HttpDelete]
[Route("Secrets")]
public virtual async Task DeleteSecretAsync(ClientSecretGetByTypeDto clientSecretGetByType)
{
await ClientAppService.DeleteSecretAsync(clientSecretGetByType);
}
[HttpPut]
[Route("Secrets")]
public virtual async Task<ClientSecretDto> UpdateSecretAsync(ClientSecretUpdateDto clientSecretUpdate)
{
return await ClientAppService.UpdateSecretAsync(clientSecretUpdate);
}
}
}

7
aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application.Contracts/.gitignore

@ -0,0 +1,7 @@
bin
obj
Logs
appsettings.*.json
node_modules
yarn.lock
package-lock.json

BIN
aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.Abp.PermissionManagement.Application.Contracts.csprojAssemblyReference.cache

Binary file not shown.

7
aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/.gitignore

@ -0,0 +1,7 @@
bin
obj
Logs
appsettings.*.json
node_modules
yarn.lock
package-lock.json

BIN
aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/bin/Debug/netstandard2.0/LINGYUN.Abp.PermissionManagement.Application.dll

Binary file not shown.

BIN
aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/bin/Debug/netstandard2.0/LINGYUN.Abp.PermissionManagement.Application.pdb

Binary file not shown.

BIN
aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/obj/Debug/netstandard2.0/LINGYUN.Abp.PermissionManagement.Application.csprojAssemblyReference.cache

Binary file not shown.

BIN
aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/obj/Debug/netstandard2.0/LINGYUN.Abp.PermissionManagement.Application.dll

Binary file not shown.

BIN
aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/obj/Debug/netstandard2.0/LINGYUN.Abp.PermissionManagement.Application.pdb

Binary file not shown.

2
aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/obj/LINGYUN.Abp.PermissionManagement.Application.csproj.nuget.g.props

@ -7,7 +7,7 @@
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\iVarKey\.nuget\packages\;D:\Microsoft\Xamarin\NuGet\;C:\Program Files (x86)\dotnet\sdk\NuGetFallbackFolder</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.4.0</NuGetToolVersion>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.5.0</NuGetToolVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>

7
aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Domain/.gitignore

@ -0,0 +1,7 @@
bin
obj
Logs
appsettings.*.json
node_modules
yarn.lock
package-lock.json

7
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/.gitignore

@ -0,0 +1,7 @@
bin
obj
Logs
appsettings.*.json
node_modules
yarn.lock
package-lock.json

BIN
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.Abp.SettingManagement.Application.Contracts.csprojAssemblyReference.cache

Binary file not shown.

7
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/.gitignore

@ -0,0 +1,7 @@
bin
obj
Logs
appsettings.*.json
node_modules
yarn.lock
package-lock.json

BIN
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/obj/Debug/netstandard2.0/LINGYUN.Abp.SettingManagement.Application.csprojAssemblyReference.cache

Binary file not shown.

7
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/.gitignore

@ -0,0 +1,7 @@
bin
obj
Logs
appsettings.*.json
node_modules
yarn.lock
package-lock.json

BIN
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/obj/Debug/netcoreapp3.1/LINGYUN.Abp.SettingManagement.HttpApi.csprojAssemblyReference.cache

Binary file not shown.

10
aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs

@ -1,10 +1,12 @@
using LINGYUN.ApiGateway;
using IdentityServer4.Validation;
using LINGYUN.ApiGateway;
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 Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using StackExchange.Redis;
using System;
@ -35,6 +37,7 @@ using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
using Volo.Abp.Threading;
using Volo.Abp.UI.Navigation.Urls;
using LINGYUN.Abp.IdentityServer;
using AbpPermissionManagementApplicationModule = LINGYUN.Abp.PermissionManagement.AbpPermissionManagementApplicationModule;
@ -42,6 +45,8 @@ namespace AuthServer.Host
{
[DependsOn(
typeof(ApiGatewayApplicationContractsModule),
typeof(AbpIdentityServerApplicationModule),
typeof(AbpIdentityServerHttpApiModule),
typeof(AbpAccountApplicationModule),
typeof(AbpAccountWebIdentityServerModule),
typeof(AbpAspNetCoreMvcUiMultiTenancyModule),
@ -158,8 +163,8 @@ namespace AuthServer.Host
app.UseAuthentication();
app.UseJwtTokenMiddleware();
app.UseMultiTenancy();
app.UseIdentityServer();
app.UseAbpRequestLocalization();
app.UseIdentityServer();
app.UseSwagger();
app.UseSwaggerUI(options =>
{
@ -167,7 +172,6 @@ namespace AuthServer.Host
});
app.UseAuditing();
app.UseMvcWithDefaultRouteAndArea();
SeedData(context);
}

2
aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj

@ -41,6 +41,8 @@
<ItemGroup>
<ProjectReference Include="..\..\..\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\LINGYUN.ApiGateway.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\modules\identityServer\LINGYUN.IdentityServer.Application\LINGYUN.IdentityServer.Application.csproj" />
<ProjectReference Include="..\..\..\modules\identityServer\LINGYUN.IdentityServer.HttpApi\LINGYUN.IdentityServer.HttpApi.csproj" />
<ProjectReference Include="..\..\..\modules\permissions\LINGYUN.Abp.PermissionManagement.Application\LINGYUN.Abp.PermissionManagement.Application.csproj" />
</ItemGroup>

133
vueJs/src/api/clients.ts

@ -0,0 +1,133 @@
import ApiService from './serviceBase'
import { FullAuditedEntityDto, PagedAndSortedResultRequestDto, PagedResultDto } from './types'
const serviceUrl = process.env.VUE_APP_BASE_API
export default class ClientService {
public static getClientById(id: string) {
let _url = '/api/IdentityServer/Clients/'
_url += id
return ApiService.Get<Client>(_url, serviceUrl)
}
public static getClients(payload: ClientGetByPaged) {
let _url = '/api/IdentityServer/Clients'
_url += '?sorting=' + payload.sorting
_url += '&skipCount=' + payload.skipCount
_url += '&maxResultCount=' + payload.maxResultCount
return ApiService.Get<PagedResultDto<Client>>(_url, serviceUrl)
}
}
export class ClientGetById {
id!: string
}
export class ClientGetByPaged extends PagedAndSortedResultRequestDto {
filter?: string
}
export class ClientSecret {
type!: string
value!: string
description: string | undefined
expiration: Date | undefined
}
export class ClientRedirectUri {
redirectUri!: string
}
export class ClientClaim {
type!: string
value!: string
}
export class ClientCorsOrigin {
origin!: string
}
export class ClientGrantType {
grantType!: string
}
export class ClientIdPRestriction {
provider!: string
}
export class ClientPostLogoutRedirectUri {
postLogoutRedirectUri!: string
}
export class ClientProperty {
key!: string
value!: string
}
export class ClientScope {
scope!: string
}
export class Client extends FullAuditedEntityDto {
id!: string
clientId!: string
clientName!: string
description?: string
clientUri?: string
logoUri?: string
enabled!: boolean
protocolType!: string
requireClientSecret!: boolean
requireConsent!: boolean
allowRememberConsent!: boolean
alwaysIncludeUserClaimsInIdToken!: boolean
requirePkce!: boolean
allowPlainTextPkce!: boolean
allowAccessTokensViaBrowser!: boolean
frontChannelLogoutUri?: string
frontChannelLogoutSessionRequired!: boolean
backChannelLogoutUri?: string
backChannelLogoutSessionRequired!: boolean
allowOfflineAccess!: boolean
identityTokenLifetime?: number
accessTokenLifetime?: number
authorizationCodeLifetime?: number
consentLifetime?: number
absoluteRefreshTokenLifetime?: number
slidingRefreshTokenLifetime?: number
refreshTokenUsage?: number
updateAccessTokenClaimsOnRefresh!: boolean
refreshTokenExpiration?: number
accessTokenType?: number
enableLocalLogin!: boolean
includeJwtId!: boolean
alwaysSendClientClaims!: boolean
clientClaimsPrefix?: string
pairWiseSubjectSalt?: string
userSsoLifetime?: number
userCodeType?: string
deviceCodeLifetime?: number
allowedScopes!: ClientScope[]
clientSecrets!: ClientSecret[]
allowedGrantTypes!: ClientGrantType[]
allowedCorsOrigins!: ClientCorsOrigin[]
redirectUris!: ClientRedirectUri[]
postLogoutRedirectUris!: ClientPostLogoutRedirectUri[]
identityProviderRestrictions!: ClientIdPRestriction[]
claims!: ClientClaim[]
properties!: ClientProperty[]
constructor() {
super()
this.allowedScopes = new Array<ClientScope>()
this.clientSecrets = new Array<ClientSecret>()
this.allowedGrantTypes = new Array<ClientGrantType>()
this.allowedCorsOrigins = new Array<ClientCorsOrigin>()
this.redirectUris = new Array<ClientRedirectUri>()
this.postLogoutRedirectUris = new Array<ClientPostLogoutRedirectUri>()
this.identityProviderRestrictions = new Array<ClientIdPRestriction>()
this.claims = new Array<ClientClaim>()
this.properties = new Array<ClientProperty>()
}
}

27
vueJs/src/api/types.ts

@ -61,6 +61,7 @@ export class PagedAndSortedResultRequestDto implements IPagedResultRequest, ISor
sorting: string | undefined
constructor() {
this.sorting = ''
this.skipCount = 1
this.maxResultCount = 30
}
@ -186,3 +187,29 @@ export interface ISoftDelete {
/** 是否已删除 */
isDeleted: boolean
}
/** 作用于接口 */
export interface IScope {
/** 作用域 */
scope: string
}
/** 密钥 */
export interface ISecret {
/** 密钥类型 */
type: string
/** 密钥值 */
value: string
/** 密钥说明 */
description: string | undefined
/** 过期日期 */
expiration: Date | undefined
}
/** 令牌 */
export interface IClaim {
/** 类型 */
type: string
/** 数值 */
value: string
}

203
vueJs/src/components/InputTagEx/index.vue

@ -0,0 +1,203 @@
<template>
<div style="width:auto; height:auto;">
<div
class="el-input-tag input-tag-wrapper"
:class="[size ? 'el-input-tag--' + size : '']"
@click="foucusTagInput"
>
<span v-if="data.length>0">
<el-tag
v-for="(tag, idx) in data"
:key="idx"
:size="size"
:closable="!readOnly"
:disable-transitions="false"
@close="remove(idx)"
>
{{ tag[label] }}
</el-tag>
</span>
<input
v-if="!readOnly"
v-model="newTag"
:size="size"
:class="[size ? 'tag-input--' + size : 'tag-input']"
@keydown="addNew"
@blur="addNew"
>
</div>
</div>
</template>
<script lang="ts">
import { Component, Vue, Prop } from 'vue-property-decorator'
import { AppModule } from '@/store/modules/app'
/* eslint-disable */
const regExpValidate: { [key: string]: RegExp } = {
url: /^(?=^.{3,255}$)((http|https|ftp)?:\/\/)?(www\.)?[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:\d+)*(\/)?(?:\/(.+)\/?$)?(\/\w+\.\w+)*([\?&]\w+=\w*|[\u4e00-\u9fa5]+)*$/
}
/* eslint-enable */
@Component({
name: 'ElInputTagEx'
})
export default class extends Vue {
@Prop({ default: () => new Array<any>() })
private data!: any[]
@Prop({ default: 'key' })
private label!: string
@Prop({ default: () => [13, 188, 9] })
private addTagOnKeys!: Array<number>
@Prop({ default: false })
private readOnly!: boolean
@Prop({ default: 'none' })
private validate!: string
// 'none' | 'email' | 'phone' | 'ipaddress' | 'ip:port' | 'key:value' | 'url'
private size = AppModule.size
public newTag: string
constructor() {
super()
this.newTag = ''
}
private foucusTagInput() {
const tagInputClass = this.size ? '.tag-input--' + this.size : '.tag-input'
if (this.readOnly || !this.$el.querySelector(tagInputClass)) {
} else {
const tagInput = this.$el.querySelector(tagInputClass) as any
tagInput.focus()
}
}
private addNew(e: any) {
if (e && (!this.addTagOnKeys.includes(e.keyCode)) && (e.type !== 'blur')) {
return false
}
if (e) {
e.stopPropagation()
e.preventDefault()
}
let addSuucess = false
if (this.newTag.includes(',')) {
this.newTag.split(',').forEach(item => {
if (this.addTag(item.trim())) {
addSuucess = true
}
})
} else {
if (this.addTag(this.newTag.trim())) {
addSuucess = true
}
}
if (addSuucess) {
this.tagChange()
this.newTag = ''
}
}
private addTag(tag: string) {
if (!tag) {
return false
}
tag = tag.trim()
if (!regExpValidate[this.validate].test(tag)) {
// validate
return false
}
if (!this.data.every(d => d[this.label] === tag)) {
this.data.push({ [this.label]: tag })
return true
}
return false
}
private remove(index: number) {
this.data.splice(index, 1)
this.tagChange()
}
private removeLastTa() {
if (this.newTag) {
return false
}
this.data.pop()
this.tagChange()
}
private tagChange() {
this.$emit('input', this.data)
}
}
</script>
<style lang="scss" scoped>
.input-tag-wrapper {
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #606266;
display: inline-block;
outline: none;
padding: 0 5px 0 5px;
transition: border-color .2s cubic-bezier(.645,.045,.355,1);
width: 100%;
height: 100%;
}
.el-tag {
margin-right: 4px;
margin-top: 4px;
}
.tag-input--default {
background: transparent;
border: 0;
font-size: 14px;
height: 38px;
outline: none;
padding-left: 0;
width: 150px;
}
.tag-input--mini{
background: transparent;
border: 0;
font-size: 14px;
height: 26px;
outline: none;
padding-left: 0;
width: 150px;
}
.tag-input--small{
background: transparent;
border: 0;
font-size: 14px;
height: 30px;
outline: none;
padding-left: 0;
width: 150px;
}
.tag-input--medium{
background: transparent;
border: 0;
font-size: 14px;
height: 34px;
outline: none;
padding-left: 0;
width: 150px;
}
</style>

32
vueJs/src/lang/zh.ts

@ -71,7 +71,9 @@ export default {
apigateway: '网关管理',
group: '路由分组',
global: '全局配置',
route: '路由配置'
route: '路由配置',
identityServer: '身份认证服务器',
clients: '客户端管理'
},
navbar: {
logOut: '退出登录',
@ -358,5 +360,33 @@ export default {
ipBlockedList: 'Ip黑名单',
authenticationProviderKey: '身份认证程序',
allowedScopes: '允许认证范围'
},
identityServer: {
otherOpera: '更多操作',
enabled: '启用客户端',
disbled: '停用客户端',
deleteClient: '删除客户端',
updateClient: '编辑客户端',
updateClientByName: '编辑客户端 {name}',
createClient: '创建客户端',
clientId: '客户端标识',
clientName: '客户端名称',
description: '客户端说明',
protocolType: '协议类型',
requirePkce: '需要Pkce',
allowPlainTextPkce: '允许纯文本Pkce',
allowOfflineAccess: '允许离线访问',
allowedScopes: '允许的作用域',
redirectUris: '重定向Uri',
allowedGrantTypes: '允许的授权类型',
allowAccessTokensViaBrowser: '允许通过浏览器访问令牌',
identityTokenLifetime: '身份令牌有效期(s)',
accessTokenLifetime: '访问令牌有效期(s)',
authorizationCodeLifetime: '授权码有效期(s)',
absoluteRefreshTokenLifetime: '绝对刷新令牌有效期(s)',
slidingRefreshTokenLifetime: '滚动刷新令牌有效期(s)',
deviceCodeLifetime: '设备授权码有效期(s)',
clientClaimsPrefix: '客户端声明前缀',
basicOptions: '基本设置'
}
}

27
vueJs/src/router/index.ts

@ -352,6 +352,33 @@ export const asyncRoutes: RouteConfig[] = [
}
}
]
},
{
path: '/identityServer',
component: Layout,
meta: {
title: 'identityServer',
icon: 'manager',
roles: ['IdentityServer.Clients'],
alwaysShow: true
},
children: [
{
path: 'clients',
component: () => import('@/views/admin/identityServer/client/index.vue'),
name: 'clients',
meta: {
title: 'clients',
icon: 'clients',
roles: ['IdentityServer.Clients']
}
}
]
},
{
path: '*',
component: () => import(/* webpackChunkName: "error-page-404" */ '@/views/error-page/404.vue'),
meta: { hidden: true }
}
]

12
vueJs/src/utils/request.ts

@ -46,14 +46,14 @@ service.interceptors.response.use(
{
confirmButtonText: '重新登录',
cancelButtonText: '取消',
type: 'warning'
type: 'error'
}).then(() => {
UserModule.ResetToken()
location.reload() // To prevent bugs from vue-router
return Promise.reject(error)
})
}
if (error.response.status === 429) {
console.log(error.response.data)
Message({
message: '您的操作过快,请稍后再试!',
type: 'warning',
@ -61,6 +61,14 @@ service.interceptors.response.use(
})
return Promise.reject(error)
}
if (error.response.status === 400 && error.response.data.error_description) {
Message({
message: error.response.data.error_description,
type: 'error',
duration: 5 * 1000
})
return Promise.reject(error)
}
let message = error.message
if (error.response.headers._abperrorformat) {
message = error.response.data.error.message + error.response.data.error.details

5
vueJs/src/views/admin/apigateway/components/RouteCreateOrEditForm.vue

@ -31,6 +31,7 @@
<el-row>
<el-col :span="12">
<el-form-item
v-popover:popRouteName
prop="reRouteName"
:label="$t('apiGateWay.reRouteName')"
>
@ -550,8 +551,8 @@ export default class extends Vue {
}
}
private onSubmitEdit(formName: string) {
const routeEditForm = this.$refs[formName] as any
private onSubmitEdit() {
const routeEditForm = this.$refs.formRoute as any
routeEditForm.validate(async(valid: boolean) => {
if (valid) {
if (this.routeId) {

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save