Browse Source

Merge pull request #712 from colinin/6.0.0

Upgrade the ABP framework to version 6.0.0
pull/651/head 6.0.0
yx lin 3 years ago
committed by GitHub
parent
commit
c306efb67c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      aspnet-core/Directory.Build.props
  2. 110
      aspnet-core/LINGYUN.MicroService.All.sln
  3. 2
      aspnet-core/common.props
  4. 0
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/FodyWeavers.xml
  5. 0
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/FodyWeavers.xsd
  6. 19
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/LINGYUN.Abp.Authentication.QQ.csproj
  7. 8
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/LINGYUN/Abp/Authentication/QQ/AbpAuthenticationQQConsts.cs
  8. 6
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/LINGYUN/Abp/Authentication/QQ/AbpAuthenticationQQModule.cs
  9. 2
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/LINGYUN/Abp/Authentication/QQ/AbpQQClaimTypes.cs
  10. 9
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/Microsoft/AspNetCore/Authentication/QQ/QQConnectOAuthHandler.cs
  11. 5
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/Microsoft/AspNetCore/Authentication/QQ/QQConnectOAuthOptions.cs
  12. 10
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/Microsoft/AspNetCore/Authentication/QQAuthenticationExtensions.cs
  13. 0
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/System/BytesExtensions.cs
  14. 0
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/System/StringExtensions.cs
  15. 0
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/System/Text/Json/JsonElementExtensions.cs
  16. 0
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/FodyWeavers.xml
  17. 0
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/FodyWeavers.xsd
  18. 19
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/LINGYUN.Abp.Authentication.WeChat.csproj
  19. 67
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/LINGYUN/Abp/Authentication/WeChat/AbpAuthenticationWeChatConsts.cs
  20. 17
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/LINGYUN/Abp/Authentication/WeChat/AbpAuthenticationWeChatModule.cs
  21. 6
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/Microsoft/AspNetCore/Authentication/WeChat/Official/WeChatOfficialOAuthHandler.cs
  22. 16
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/Microsoft/AspNetCore/Authentication/WeChat/Official/WeChatOfficialOAuthOptions.cs
  23. 0
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/Microsoft/AspNetCore/Authentication/WeChat/Official/WeChatOfficialStateCacheItem.cs
  24. 4
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/Microsoft/AspNetCore/Authentication/WeChatAuthenticationExtensions.cs
  25. 4
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/Microsoft/AspNetCore/Builder/IdentityServerApplicationBuilderExtensions.cs
  26. 3
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/Microsoft/AspNetCore/Http/WeChatOfficialSignatureMiddleware.cs
  27. 0
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/System/BytesExtensions.cs
  28. 0
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/System/StringExtensions.cs
  29. 0
      aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/System/Text/Json/JsonElementExtensions.cs
  30. 2
      aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN.Abp.Cli.csproj
  31. 8
      aspnet-core/modules/common/LINGYUN.Abp.AspNetCore.Mvc.Client/LINGYUN/Abp/AspNetCore/Mvc/Client/MvcCachedApplicationConfigurationClient.cs
  32. 5
      aspnet-core/modules/common/LINGYUN.Abp.BackgroundWorkers.Hangfire/LINGYUN/Abp/BackgroundWorkers/Hangfire/HangfireBackgroundWorkerAdapter.cs
  33. 4
      aspnet-core/modules/common/LINGYUN.Abp.BackgroundWorkers.Hangfire/LINGYUN/Abp/BackgroundWorkers/Hangfire/HangfireBackgroundWorkerManager.cs
  34. 5
      aspnet-core/modules/common/LINGYUN.Abp.BackgroundWorkers.Hangfire/LINGYUN/Abp/BackgroundWorkers/Hangfire/IHangfireBackgroundWorkerAdapter.cs
  35. 5
      aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPConsumerServiceSelector.cs
  36. 40
      aspnet-core/modules/common/LINGYUN.Abp.Wrapper/README.md
  37. 8
      aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.QQ/LINGYUN/Abp/IdentityServer/QQ/AbpIdentityServerQQConsts.cs
  38. 26
      aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN.Abp.IdentityServer.WeChat.csproj
  39. 56
      aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/AbpIdentityServerWeChatModule.cs
  40. 75
      aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/MiniProgram/WeChatMiniProgramGrantValidator.cs
  41. 67
      aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/MiniProgram/WeChatMiniProgramProfileService.cs
  42. 75
      aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/Official/WeChatOfficialGrantValidator.cs
  43. 71
      aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/Official/WeChatOfficialOAuthConsts.cs
  44. 242
      aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/WeChatGrantValidator.cs
  45. 3
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/FodyWeavers.xml
  46. 30
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/FodyWeavers.xsd
  47. 25
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN.Abp.OpenIddict.Application.Contracts.csproj
  48. 29
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/AbpOpenIddictApplicationContractsModule.cs
  49. 14
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Applications/IOpenIddictApplicationAppService.cs
  50. 8
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Applications/OpenIddictApplicationCreateDto.cs
  51. 43
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Applications/OpenIddictApplicationCreateOrUpdateDto.cs
  52. 26
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Applications/OpenIddictApplicationDto.cs
  53. 10
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Applications/OpenIddictApplicationGetListInput.cs
  54. 8
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Applications/OpenIddictApplicationUpdateDto.cs
  55. 13
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Authorizations/IOpenIddictAuthorizationAppService.cs
  56. 17
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Authorizations/OpenIddictAuthorizationDto.cs
  57. 16
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Authorizations/OpenIddictAuthorizationGetListInput.cs
  58. 44
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Localization/Resources/en.json
  59. 44
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Localization/Resources/zh-Hans.json
  60. 26
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/OpenIddictApplicationErrorCodes.cs
  61. 8
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/OpenIddictRemoteServiceConsts.cs
  62. 84
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Permissions/AbpOpenIddictPermissionDefinitionProvider.cs
  63. 36
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Permissions/AbpOpenIddictPermissions.cs
  64. 14
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Scopes/IOpenIddictScopeAppService.cs
  65. 8
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Scopes/OpenIddictScopeCreateDto.cs
  66. 27
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Scopes/OpenIddictScopeCreateOrUpdateDto.cs
  67. 24
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Scopes/OpenIddictScopeDto.cs
  68. 10
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Scopes/OpenIddictScopeGetListInput.cs
  69. 8
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Scopes/OpenIddictScopeUpdateDto.cs
  70. 13
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Tokens/IOpenIddictTokenAppService.cs
  71. 30
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Tokens/OpenIddictTokenDto.cs
  72. 20
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Tokens/OpenIddictTokenGetListInput.cs
  73. 3
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/FodyWeavers.xml
  74. 30
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/FodyWeavers.xsd
  75. 20
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN.Abp.OpenIddict.Application.csproj
  76. 13
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/AbpOpenIddictApplicationModule.cs
  77. 86
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/Applications/OpenIddictApplicationAppService.cs
  78. 162
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/Applications/OpenIddictApplicationExtensions.cs
  79. 82
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/Authorizations/OpenIddictAuthorizationAppService.cs
  80. 38
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/Authorizations/OpenIddictAuthorizationExtensions.cs
  81. 22
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/OpenIddictApplicationServiceBase.cs
  82. 85
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/Scopes/OpenIddictScopeAppService.cs
  83. 62
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/Scopes/OpenIddictScopeExtensions.cs
  84. 94
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/Tokens/OpenIddictTokenAppService.cs
  85. 68
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/Tokens/OpenIddictTokenExtensions.cs
  86. 26
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/Volo/Abp/Json/IJsonSerializerExtensions.cs
  87. 3
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Dapr.Client/FodyWeavers.xml
  88. 30
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Dapr.Client/FodyWeavers.xsd
  89. 16
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Dapr.Client/LINGYUN.Abp.OpenIddict.Dapr.Client.csproj
  90. 18
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Dapr.Client/LINGYUN/Abp/OpenIddict/AbpOpenIddictDaprClientModule.cs
  91. 3
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi.Client/FodyWeavers.xml
  92. 30
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi.Client/FodyWeavers.xsd
  93. 19
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi.Client/LINGYUN.Abp.OpenIddict.HttpApi.Client.csproj
  94. 18
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi.Client/LINGYUN/Abp/OpenIddict/AbpOpenIddictHttpApiClientModule.cs
  95. 3
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi/FodyWeavers.xml
  96. 30
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi/FodyWeavers.xsd
  97. 19
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi/LINGYUN.Abp.OpenIddict.HttpApi.csproj
  98. 38
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi/LINGYUN/Abp/OpenIddict/AbpOpenIddictHttpApiModule.cs
  99. 60
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi/LINGYUN/Abp/OpenIddict/Applications/OpenIddictApplicationController.cs
  100. 45
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi/LINGYUN/Abp/OpenIddict/Authorizations/OpenIddictAuthorizationController.cs

14
aspnet-core/Directory.Build.props

@ -1,10 +1,10 @@
<Project>
<PropertyGroup>
<VoloAbpPackageVersion>5.3.4</VoloAbpPackageVersion>
<LINGYUNAbpPackageVersion>5.3.5</LINGYUNAbpPackageVersion>
<VoloAbpPackageVersion>6.0.0</VoloAbpPackageVersion>
<LINGYUNAbpPackageVersion>6.0.0</LINGYUNAbpPackageVersion>
<DaprPackageVersion>1.8.0</DaprPackageVersion>
<DistributedLockRedisPackageVersion>1.0.1</DistributedLockRedisPackageVersion>
<DotNetCoreCAPPackageVersion>6.0.1</DotNetCoreCAPPackageVersion>
<DistributedLockRedisPackageVersion>1.0.2</DistributedLockRedisPackageVersion>
<DotNetCoreCAPPackageVersion>6.2.0</DotNetCoreCAPPackageVersion>
<ElsaPackageVersion>2.8.2</ElsaPackageVersion>
<AliyunSDKPackageVersion>1.5.10</AliyunSDKPackageVersion>
<AliyunOSSSDKPackageVersion>2.13.0</AliyunOSSSDKPackageVersion>
@ -14,20 +14,20 @@
<HangfireMSSQLStoragePackageVersion>1.7.29</HangfireMSSQLStoragePackageVersion>
<NESTPackageVersion>7.15.1</NESTPackageVersion>
<OpenTelemetryExtensionsHostingPackageVersion>1.0.0-rc8</OpenTelemetryExtensionsHostingPackageVersion>
<OpenTelemetryExporterZipkinPackageVersion>1.2.0-rc1</OpenTelemetryExporterZipkinPackageVersion>
<OpenTelemetryExporterZipkinPackageVersion>1.3.1</OpenTelemetryExporterZipkinPackageVersion>
<OpenTelemetryInstrumentationAspNetCorePackageVersion>1.0.0-rc8</OpenTelemetryInstrumentationAspNetCorePackageVersion>
<OpenTelemetryInstrumentationHttpPackageVersion>1.0.0-rc8</OpenTelemetryInstrumentationHttpPackageVersion>
<OpenTelemetryContribInstrumentationEntityFrameworkCorePackageVersion>1.0.0-beta2</OpenTelemetryContribInstrumentationEntityFrameworkCorePackageVersion>
<QuartzNETPackageVersion>3.3.3</QuartzNETPackageVersion>
<StackExchangeRedisPackageVersion>2.0.593</StackExchangeRedisPackageVersion>
<SerilogPackageVersion>2.10.0</SerilogPackageVersion>
<SerilogAspNetCorePackageVersion>4.1.0</SerilogAspNetCorePackageVersion>
<SerilogAspNetCorePackageVersion>5.0.0</SerilogAspNetCorePackageVersion>
<SerilogEnrichersEnvironmentPackageVersion>2.2.0</SerilogEnrichersEnvironmentPackageVersion>
<SerilogEnrichersAssemblyPackageVersion>2.0.0</SerilogEnrichersAssemblyPackageVersion>
<SerilogEnrichersProcessPackageVersion>2.0.1</SerilogEnrichersProcessPackageVersion>
<SerilogEnrichersThreadPackageVersion>3.1.0</SerilogEnrichersThreadPackageVersion>
<SerilogExtensionsLoggingPackageVersion>3.0.1</SerilogExtensionsLoggingPackageVersion>
<SerilogSettingsConfigurationPackageVersion>3.1.0</SerilogSettingsConfigurationPackageVersion>
<SerilogSettingsConfigurationPackageVersion>3.4.0</SerilogSettingsConfigurationPackageVersion>
<SerilogSinksConsolePackageVersion>4.0.0</SerilogSinksConsolePackageVersion>
<SerilogSinksElasticsearchPackageVersion>8.4.1</SerilogSinksElasticsearchPackageVersion>
<SerilogSinksFilePackageVersion>5.0.0</SerilogSinksFilePackageVersion>

110
aspnet-core/LINGYUN.MicroService.All.sln

@ -194,8 +194,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.WeChat.Official
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.WeChat.SettingManagement", "modules\wechat\LINGYUN.Abp.WeChat.SettingManagement\LINGYUN.Abp.WeChat.SettingManagement.csproj", "{EC19F867-E9EA-4B26-A1E7-87AAA3EB9296}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.IdentityServer.WeChat", "modules\identityServer\LINGYUN.Abp.IdentityServer.WeChat\LINGYUN.Abp.IdentityServer.WeChat.csproj", "{7356FC4B-CAB2-4808-8C97-9AF74583F3A4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Notifications.WeChat.MiniProgram", "modules\wechat\LINGYUN.Abp.Notifications.WeChat.MiniProgram\LINGYUN.Abp.Notifications.WeChat.MiniProgram.csproj", "{DC15AE5F-D20E-47E4-92A4-DBBD1BD51E91}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cloud-aliyun", "cloud-aliyun", "{14CDBAD1-10C8-464A-B445-1F727C988010}"
@ -366,8 +364,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.OssManagement.T
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.IdentityServer.LinkUser", "modules\identityServer\LINGYUN.Abp.IdentityServer.LinkUser\LINGYUN.Abp.IdentityServer.LinkUser.csproj", "{25378F9D-2A66-4568-AAC6-E9282ACA3DD3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.IdentityServer.QQ", "modules\identityServer\LINGYUN.Abp.IdentityServer.QQ\LINGYUN.Abp.IdentityServer.QQ.csproj", "{A34CCD3F-28A1-4BAD-A995-EB8720CE4105}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Tencent.QQ", "modules\cloud-tencent\LINGYUN.Abp.Tencent.QQ\LINGYUN.Abp.Tencent.QQ.csproj", "{3FCB1BCD-34BC-4F66-968F-38DB28371D0F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.MultiTenancy.Editions", "modules\tenants\LINGYUN.Abp.MultiTenancy.Editions\LINGYUN.Abp.MultiTenancy.Editions.csproj", "{A030CD8E-61F3-4C15-B28A-C301446DDBEC}"
@ -472,6 +468,38 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Http.Client.Wra
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Dapr.Actors.AspNetCore.Wrapper", "modules\dapr\LINGYUN.Abp.Dapr.Actors.AspNetCore.Wrapper\LINGYUN.Abp.Dapr.Actors.AspNetCore.Wrapper.csproj", "{FBB50072-33BE-4B4A-8908-E98BC0C80B92}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "openiddict", "openiddict", "{83E698F6-F8CD-4604-AB80-01A203389501}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.OpenIddict.Application.Contracts", "modules\openIddict\LINGYUN.Abp.OpenIddict.Application.Contracts\LINGYUN.Abp.OpenIddict.Application.Contracts.csproj", "{D509011F-4690-4F21-BA30-E4C31799993F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.OpenIddict.Application", "modules\openIddict\LINGYUN.Abp.OpenIddict.Application\LINGYUN.Abp.OpenIddict.Application.csproj", "{257C64BC-BD16-4F6D-A0B9-E286A4161241}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.OpenIddict.HttpApi", "modules\openIddict\LINGYUN.Abp.OpenIddict.HttpApi\LINGYUN.Abp.OpenIddict.HttpApi.csproj", "{785251E2-6E77-40E3-90C2-4DFB63D0721B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.OpenIddict.HttpApi.Client", "modules\openIddict\LINGYUN.Abp.OpenIddict.HttpApi.Client\LINGYUN.Abp.OpenIddict.HttpApi.Client.csproj", "{0521239A-6B83-414F-B3E2-0515FC70F121}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.OpenIddict.Dapr.Client", "modules\openIddict\LINGYUN.Abp.OpenIddict.Dapr.Client\LINGYUN.Abp.OpenIddict.Dapr.Client.csproj", "{44E33132-9427-4E52-B105-67A8BC2BC29E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "authentication", "authentication", "{E567A760-D19A-4CAC-BD6B-BAA0CE0BBC1B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Authentication.QQ", "modules\authentication\LINGYUN.Abp.Authentication.QQ\LINGYUN.Abp.Authentication.QQ.csproj", "{D3008465-B344-4243-B14A-A1430E2BEC48}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Authentication.WeChat", "modules\authentication\LINGYUN.Abp.Authentication.WeChat\LINGYUN.Abp.Authentication.WeChat.csproj", "{3CBA6005-B412-4D2A-8F1E-01D53D5C657E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "auth-server", "auth-server", "{9DEBD2BE-B7B6-49BF-8726-CD92C1163323}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "auth-server-api", "auth-server-api", "{34C664D3-416E-4639-B25A-8D8F434F9CB8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LY.MicroService.AuthServer", "services\LY.MicroService.AuthServer\LY.MicroService.AuthServer.csproj", "{A8DE7E8A-700F-4FC4-8BD6-96879F24170F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LY.MicroService.AuthServer.HttpApi.Host", "services\LY.MicroService.AuthServer.HttpApi.Host\LY.MicroService.AuthServer.HttpApi.Host.csproj", "{84BDF841-2487-43BA-831E-2854FEBA7D29}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.OpenIddict.LinkUser", "modules\openIddict\LINGYUN.Abp.OpenIddict.LinkUser\LINGYUN.Abp.OpenIddict.LinkUser.csproj", "{15EC4A03-D172-4984-B9CA-2C73929838DE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.OpenIddict.Sms", "modules\openIddict\LINGYUN.Abp.OpenIddict.Sms\LINGYUN.Abp.OpenIddict.Sms.csproj", "{74C13BCC-A5A5-40FA-81E8-83DCCF760148}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.OpenIddict.WeChat", "modules\openIddict\LINGYUN.Abp.OpenIddict.WeChat\LINGYUN.Abp.OpenIddict.WeChat.csproj", "{427382F6-3153-47A2-BBC4-88F6EA116A8F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -770,10 +798,6 @@ Global
{EC19F867-E9EA-4B26-A1E7-87AAA3EB9296}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC19F867-E9EA-4B26-A1E7-87AAA3EB9296}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EC19F867-E9EA-4B26-A1E7-87AAA3EB9296}.Release|Any CPU.Build.0 = Release|Any CPU
{7356FC4B-CAB2-4808-8C97-9AF74583F3A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7356FC4B-CAB2-4808-8C97-9AF74583F3A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7356FC4B-CAB2-4808-8C97-9AF74583F3A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7356FC4B-CAB2-4808-8C97-9AF74583F3A4}.Release|Any CPU.Build.0 = Release|Any CPU
{DC15AE5F-D20E-47E4-92A4-DBBD1BD51E91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DC15AE5F-D20E-47E4-92A4-DBBD1BD51E91}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DC15AE5F-D20E-47E4-92A4-DBBD1BD51E91}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -1046,10 +1070,6 @@ Global
{25378F9D-2A66-4568-AAC6-E9282ACA3DD3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25378F9D-2A66-4568-AAC6-E9282ACA3DD3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{25378F9D-2A66-4568-AAC6-E9282ACA3DD3}.Release|Any CPU.Build.0 = Release|Any CPU
{A34CCD3F-28A1-4BAD-A995-EB8720CE4105}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A34CCD3F-28A1-4BAD-A995-EB8720CE4105}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A34CCD3F-28A1-4BAD-A995-EB8720CE4105}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A34CCD3F-28A1-4BAD-A995-EB8720CE4105}.Release|Any CPU.Build.0 = Release|Any CPU
{3FCB1BCD-34BC-4F66-968F-38DB28371D0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3FCB1BCD-34BC-4F66-968F-38DB28371D0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3FCB1BCD-34BC-4F66-968F-38DB28371D0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -1226,6 +1246,54 @@ Global
{FBB50072-33BE-4B4A-8908-E98BC0C80B92}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FBB50072-33BE-4B4A-8908-E98BC0C80B92}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FBB50072-33BE-4B4A-8908-E98BC0C80B92}.Release|Any CPU.Build.0 = Release|Any CPU
{D509011F-4690-4F21-BA30-E4C31799993F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D509011F-4690-4F21-BA30-E4C31799993F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D509011F-4690-4F21-BA30-E4C31799993F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D509011F-4690-4F21-BA30-E4C31799993F}.Release|Any CPU.Build.0 = Release|Any CPU
{257C64BC-BD16-4F6D-A0B9-E286A4161241}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{257C64BC-BD16-4F6D-A0B9-E286A4161241}.Debug|Any CPU.Build.0 = Debug|Any CPU
{257C64BC-BD16-4F6D-A0B9-E286A4161241}.Release|Any CPU.ActiveCfg = Release|Any CPU
{257C64BC-BD16-4F6D-A0B9-E286A4161241}.Release|Any CPU.Build.0 = Release|Any CPU
{785251E2-6E77-40E3-90C2-4DFB63D0721B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{785251E2-6E77-40E3-90C2-4DFB63D0721B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{785251E2-6E77-40E3-90C2-4DFB63D0721B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{785251E2-6E77-40E3-90C2-4DFB63D0721B}.Release|Any CPU.Build.0 = Release|Any CPU
{0521239A-6B83-414F-B3E2-0515FC70F121}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0521239A-6B83-414F-B3E2-0515FC70F121}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0521239A-6B83-414F-B3E2-0515FC70F121}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0521239A-6B83-414F-B3E2-0515FC70F121}.Release|Any CPU.Build.0 = Release|Any CPU
{44E33132-9427-4E52-B105-67A8BC2BC29E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{44E33132-9427-4E52-B105-67A8BC2BC29E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{44E33132-9427-4E52-B105-67A8BC2BC29E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{44E33132-9427-4E52-B105-67A8BC2BC29E}.Release|Any CPU.Build.0 = Release|Any CPU
{D3008465-B344-4243-B14A-A1430E2BEC48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D3008465-B344-4243-B14A-A1430E2BEC48}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D3008465-B344-4243-B14A-A1430E2BEC48}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D3008465-B344-4243-B14A-A1430E2BEC48}.Release|Any CPU.Build.0 = Release|Any CPU
{3CBA6005-B412-4D2A-8F1E-01D53D5C657E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3CBA6005-B412-4D2A-8F1E-01D53D5C657E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3CBA6005-B412-4D2A-8F1E-01D53D5C657E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3CBA6005-B412-4D2A-8F1E-01D53D5C657E}.Release|Any CPU.Build.0 = Release|Any CPU
{A8DE7E8A-700F-4FC4-8BD6-96879F24170F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A8DE7E8A-700F-4FC4-8BD6-96879F24170F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A8DE7E8A-700F-4FC4-8BD6-96879F24170F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A8DE7E8A-700F-4FC4-8BD6-96879F24170F}.Release|Any CPU.Build.0 = Release|Any CPU
{84BDF841-2487-43BA-831E-2854FEBA7D29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{84BDF841-2487-43BA-831E-2854FEBA7D29}.Debug|Any CPU.Build.0 = Debug|Any CPU
{84BDF841-2487-43BA-831E-2854FEBA7D29}.Release|Any CPU.ActiveCfg = Release|Any CPU
{84BDF841-2487-43BA-831E-2854FEBA7D29}.Release|Any CPU.Build.0 = Release|Any CPU
{15EC4A03-D172-4984-B9CA-2C73929838DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{15EC4A03-D172-4984-B9CA-2C73929838DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{15EC4A03-D172-4984-B9CA-2C73929838DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{15EC4A03-D172-4984-B9CA-2C73929838DE}.Release|Any CPU.Build.0 = Release|Any CPU
{74C13BCC-A5A5-40FA-81E8-83DCCF760148}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74C13BCC-A5A5-40FA-81E8-83DCCF760148}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74C13BCC-A5A5-40FA-81E8-83DCCF760148}.Release|Any CPU.ActiveCfg = Release|Any CPU
{74C13BCC-A5A5-40FA-81E8-83DCCF760148}.Release|Any CPU.Build.0 = Release|Any CPU
{427382F6-3153-47A2-BBC4-88F6EA116A8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{427382F6-3153-47A2-BBC4-88F6EA116A8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{427382F6-3153-47A2-BBC4-88F6EA116A8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{427382F6-3153-47A2-BBC4-88F6EA116A8F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -1322,7 +1390,6 @@ Global
{F18DE651-A3E4-478F-A2B5-686429729EB8} = {DD9BE9E7-F6BF-4869-BCD2-82F5072BDA21}
{42309C06-C0F2-490F-931B-CF41FA1970FF} = {DD9BE9E7-F6BF-4869-BCD2-82F5072BDA21}
{EC19F867-E9EA-4B26-A1E7-87AAA3EB9296} = {DD9BE9E7-F6BF-4869-BCD2-82F5072BDA21}
{7356FC4B-CAB2-4808-8C97-9AF74583F3A4} = {0439B173-F41E-4CE0-A44A-CCB70328F272}
{DC15AE5F-D20E-47E4-92A4-DBBD1BD51E91} = {DD9BE9E7-F6BF-4869-BCD2-82F5072BDA21}
{14CDBAD1-10C8-464A-B445-1F727C988010} = {C5CAD011-DF84-4914-939C-0C029DCEF26F}
{3B96F4D8-4993-419B-BCEB-AFE4ED39449F} = {C5CAD011-DF84-4914-939C-0C029DCEF26F}
@ -1404,7 +1471,6 @@ Global
{A4B972EC-9F0B-4405-9965-766FABC9B07E} = {3B96F4D8-4993-419B-BCEB-AFE4ED39449F}
{31E60E23-FD98-4D5E-A137-2B3F2968BA09} = {B05CB08F-C088-4D6D-97EE-A94A5D1AE4A6}
{25378F9D-2A66-4568-AAC6-E9282ACA3DD3} = {0439B173-F41E-4CE0-A44A-CCB70328F272}
{A34CCD3F-28A1-4BAD-A995-EB8720CE4105} = {0439B173-F41E-4CE0-A44A-CCB70328F272}
{3FCB1BCD-34BC-4F66-968F-38DB28371D0F} = {3B96F4D8-4993-419B-BCEB-AFE4ED39449F}
{A030CD8E-61F3-4C15-B28A-C301446DDBEC} = {A5543E56-DA53-494D-A531-DA75091D46FF}
{D01D859E-4B72-478A-BABD-90F0981652D5} = {C5CAD011-DF84-4914-939C-0C029DCEF26F}
@ -1457,6 +1523,22 @@ Global
{3E9D07D8-963C-4A61-B720-BD47593BE752} = {ECC8B9A9-9E92-4493-984D-2E350A49189D}
{942816E3-B270-40DC-9532-C1077FF59A32} = {8AC72641-30D3-4ACF-89FA-808FADC55C2E}
{FBB50072-33BE-4B4A-8908-E98BC0C80B92} = {DC33925B-264D-421B-96CC-46F853CBCC70}
{83E698F6-F8CD-4604-AB80-01A203389501} = {C5CAD011-DF84-4914-939C-0C029DCEF26F}
{D509011F-4690-4F21-BA30-E4C31799993F} = {83E698F6-F8CD-4604-AB80-01A203389501}
{257C64BC-BD16-4F6D-A0B9-E286A4161241} = {83E698F6-F8CD-4604-AB80-01A203389501}
{785251E2-6E77-40E3-90C2-4DFB63D0721B} = {83E698F6-F8CD-4604-AB80-01A203389501}
{0521239A-6B83-414F-B3E2-0515FC70F121} = {83E698F6-F8CD-4604-AB80-01A203389501}
{44E33132-9427-4E52-B105-67A8BC2BC29E} = {83E698F6-F8CD-4604-AB80-01A203389501}
{E567A760-D19A-4CAC-BD6B-BAA0CE0BBC1B} = {C5CAD011-DF84-4914-939C-0C029DCEF26F}
{D3008465-B344-4243-B14A-A1430E2BEC48} = {E567A760-D19A-4CAC-BD6B-BAA0CE0BBC1B}
{3CBA6005-B412-4D2A-8F1E-01D53D5C657E} = {E567A760-D19A-4CAC-BD6B-BAA0CE0BBC1B}
{9DEBD2BE-B7B6-49BF-8726-CD92C1163323} = {672E1170-7B18-474B-85C7-1961BF2A48AE}
{34C664D3-416E-4639-B25A-8D8F434F9CB8} = {672E1170-7B18-474B-85C7-1961BF2A48AE}
{A8DE7E8A-700F-4FC4-8BD6-96879F24170F} = {9DEBD2BE-B7B6-49BF-8726-CD92C1163323}
{84BDF841-2487-43BA-831E-2854FEBA7D29} = {34C664D3-416E-4639-B25A-8D8F434F9CB8}
{15EC4A03-D172-4984-B9CA-2C73929838DE} = {83E698F6-F8CD-4604-AB80-01A203389501}
{74C13BCC-A5A5-40FA-81E8-83DCCF760148} = {83E698F6-F8CD-4604-AB80-01A203389501}
{427382F6-3153-47A2-BBC4-88F6EA116A8F} = {83E698F6-F8CD-4604-AB80-01A203389501}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C95FDF91-16F2-4A8B-A4BE-0E62D1B66718}

2
aspnet-core/common.props

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>5.3.5</Version>
<Version>6.0.0</Version>
<Authors>colin</Authors>
<NoWarn>$(NoWarn);CS1591;CS0436;CS8618</NoWarn>
<PackageProjectUrl>https://github.com/colinin/abp-next-admin</PackageProjectUrl>

0
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.QQ/FodyWeavers.xml → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/FodyWeavers.xml

0
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.QQ/FodyWeavers.xsd → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/FodyWeavers.xsd

19
aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/LINGYUN.Abp.Authentication.QQ.csproj

@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\common.props" />
<Import Project="..\..\..\configureawait.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="$(MicrosoftPackageVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\cloud-tencent\LINGYUN.Abp.Tencent.QQ\LINGYUN.Abp.Tencent.QQ.csproj" />
</ItemGroup>
</Project>

8
aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/LINGYUN/Abp/Authentication/QQ/AbpAuthenticationQQConsts.cs

@ -0,0 +1,8 @@
namespace LINGYUN.Abp.Authentication.QQ;
public static class AbpAuthenticationQQConsts
{
public static string AuthenticationScheme { get; set; } = "QQ Connect";
public static string DisplayName { get; set; } = "QQ Connect";
public static string CallbackPath { get; set; } = "/signin-callback";
}

6
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.QQ/LINGYUN/Abp/IdentityServer/QQ/AbpIdentityServerQQModule.cs → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/LINGYUN/Abp/Authentication/QQ/AbpAuthenticationQQModule.cs

@ -1,14 +1,12 @@
using LINGYUN.Abp.Tencent.QQ;
using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.IdentityServer;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.IdentityServer.QQ;
namespace LINGYUN.Abp.Authentication.QQ;
[DependsOn(typeof(AbpTencentQQModule))]
[DependsOn(typeof(AbpIdentityServerDomainModule))]
public class AbpIdentityServerQQModule : AbpModule
public class AbpAuthenticationQQModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{

2
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.QQ/LINGYUN/Abp/IdentityServer/QQ/AbpQQClaimTypes.cs → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/LINGYUN/Abp/Authentication/QQ/AbpQQClaimTypes.cs

@ -1,4 +1,4 @@
namespace LINGYUN.Abp.WeChat.Security.Claims
namespace LINGYUN.Abp.Authentication.QQ
{
/// <summary>
/// QQ互联身份类型,可以像 <see cref="Volo.Abp.Security.Claims.AbpClaimTypes"/> 自行配置

9
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.QQ/Microsoft/AspNetCore/Authentication/QQ/QQConnectOAuthHandler.cs → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/Microsoft/AspNetCore/Authentication/QQ/QQConnectOAuthHandler.cs

@ -1,7 +1,7 @@
using LINGYUN.Abp.Tencent.QQ;
using LINGYUN.Abp.WeChat.Security.Claims;
using Microsoft.AspNetCore.Authentication.OAuth;
using Microsoft.AspNetCore.WebUtilities;
using LINGYUN.Abp.Authentication.QQ;
using LINGYUN.Abp.Tencent.QQ;
using Microsoft.AspNetCore.Authentication.OAuth;
using Microsoft.AspNetCore.WebUtilities;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using System;
@ -54,6 +54,7 @@ namespace Microsoft.AspNetCore.Authentication.QQ
challengeUrl += "&display=mobile";
}
return challengeUrl;
}
/// <summary>

5
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.QQ/Microsoft/AspNetCore/Authentication/QQ/QQConnectOAuthOptions.cs → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/Microsoft/AspNetCore/Authentication/QQ/QQConnectOAuthOptions.cs

@ -1,5 +1,4 @@
using LINGYUN.Abp.IdentityServer.QQ;
using LINGYUN.Abp.WeChat.Security.Claims;
using LINGYUN.Abp.Authentication.QQ;
using Microsoft.AspNetCore.Authentication.OAuth;
using Microsoft.AspNetCore.Http;
using System.Security.Claims;
@ -24,7 +23,7 @@ namespace Microsoft.AspNetCore.Authentication.QQ
ClientSecret = "QQConnect";
ClaimsIssuer = "connect.qq.com";
CallbackPath = new PathString(AbpIdentityServerQQConsts.CallbackPath);
CallbackPath = new PathString(AbpAuthenticationQQConsts.CallbackPath);
AuthorizationEndpoint = "https://graph.qq.com/oauth2.0/authorize";
TokenEndpoint = "https://graph.qq.com/oauth2.0/token";

10
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.QQ/Microsoft/AspNetCore/Authentication/QQAuthenticationExtensions.cs → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/Microsoft/AspNetCore/Authentication/QQAuthenticationExtensions.cs

@ -1,4 +1,4 @@
using LINGYUN.Abp.IdentityServer.QQ;
using LINGYUN.Abp.Authentication.QQ;
using Microsoft.AspNetCore.Authentication.QQ;
using Microsoft.Extensions.DependencyInjection;
using System;
@ -14,8 +14,8 @@ namespace Microsoft.AspNetCore.Authentication
{
return builder
.AddQQConnect(
AbpIdentityServerQQConsts.AuthenticationScheme,
AbpIdentityServerQQConsts.DisplayName,
AbpAuthenticationQQConsts.AuthenticationScheme,
AbpAuthenticationQQConsts.DisplayName,
options => { });
}
@ -27,7 +27,7 @@ namespace Microsoft.AspNetCore.Authentication
{
return builder
.AddQQConnect(
AbpIdentityServerQQConsts.AuthenticationScheme,
AbpAuthenticationQQConsts.AuthenticationScheme,
configureOptions);
}
@ -41,7 +41,7 @@ namespace Microsoft.AspNetCore.Authentication
return builder
.AddQQConnect(
authenticationScheme,
AbpIdentityServerQQConsts.DisplayName,
AbpAuthenticationQQConsts.DisplayName,
configureOptions);
}

0
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.QQ/System/BytesExtensions.cs → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/System/BytesExtensions.cs

0
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.QQ/System/StringExtensions.cs → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/System/StringExtensions.cs

0
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.QQ/System/Text/Json/JsonElementExtensions.cs → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.QQ/System/Text/Json/JsonElementExtensions.cs

0
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/FodyWeavers.xml → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/FodyWeavers.xml

0
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/FodyWeavers.xsd → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/FodyWeavers.xsd

19
aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/LINGYUN.Abp.Authentication.WeChat.csproj

@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\common.props" />
<Import Project="..\..\..\configureawait.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="$(MicrosoftPackageVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\wechat\LINGYUN.Abp.WeChat.Official\LINGYUN.Abp.WeChat.Official.csproj" />
</ItemGroup>
</Project>

67
aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/LINGYUN/Abp/Authentication/WeChat/AbpAuthenticationWeChatConsts.cs

@ -0,0 +1,67 @@
using LINGYUN.Abp.WeChat;
using LINGYUN.Abp.WeChat.Official;
namespace LINGYUN.Abp.Authentication.WeChat;
public static class AbpAuthenticationWeChatConsts
{
/// <summary>
/// 微信个人信息标识
/// </summary>
public static string ProfileKey => AbpWeChatGlobalConsts.ProfileKey;
/// <summary>
/// 微信提供者标识
/// </summary>
public static string ProviderKey => AbpWeChatOfficialConsts.ProviderName;
/// <summary>
/// 微信提供者显示名称
/// </summary>
public static string DisplayName => AbpWeChatGlobalConsts.DisplayName;
/// <summary>
/// 回调地址
/// </summary>
public static string CallbackPath { get; set; } = "/signin-callback";
/// <summary>
/// 微信客户端外的网页登录
/// </summary>
public const string QrConnectEndpoint = "https://open.weixin.qq.com/connect/qrconnect";
/// <summary>
/// 微信客户端内的网页登录
/// </summary>
public const string AuthorizationEndpoint = "https://open.weixin.qq.com/connect/oauth2/authorize";
/// <summary>
/// 用户允许授权后通过返回的code换取access_token地址
/// </summary>
public const string TokenEndpoint = "https://api.weixin.qq.com/sns/oauth2/access_token";
/// <summary>
/// 使用access_token获取用户个人信息地址
/// </summary>
public const string UserInformationEndpoint = "https://api.weixin.qq.com/sns/userinfo";
/// <summary>
/// 弹出授权页面,可通过openid拿到昵称、性别、所在地。
/// 并且, 即使在未关注的情况下,只要用户授权,也能获取其信息
/// <br />
/// <br />
/// 详询: <see cref="https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html"/>
/// </summary>
/// <remarks>
/// 以snsapi_userinfo为scope发起的网页授权,是用来获取用户的基本信息的。
/// 但这种授权需要用户手动同意,并且由于用户同意过,所以无须关注,就可在授权后获取该用户的基本信息
/// </remarks>
public const string UserInfoScope = "snsapi_userinfo";
/// <summary>
/// 不弹出授权页面,直接跳转,只能获取用户openid
/// <br />
/// <br />
/// 详询: <see cref="https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html"/>
/// </summary>
/// <remarks>
/// 以snsapi_base为scope发起的网页授权,是用来获取进入页面的用户的openid的,并且是静默授权并自动跳转到回调页的。
/// 用户感知的就是直接进入了回调页(往往是业务页面)
/// </remarks>
public const string LoginScope = "snsapi_login";
}

17
aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/LINGYUN/Abp/Authentication/WeChat/AbpAuthenticationWeChatModule.cs

@ -0,0 +1,17 @@
using LINGYUN.Abp.WeChat.Official;
using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Authentication.WeChat;
[DependsOn(typeof(AbpWeChatOfficialModule))]
public class AbpAuthenticationWeChatModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services
.AddAuthentication()
.AddWeChat();
}
}

6
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/Microsoft/AspNetCore/Authentication/WeChat/Official/WeChatOfficialOAuthHandler.cs → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/Microsoft/AspNetCore/Authentication/WeChat/Official/WeChatOfficialOAuthHandler.cs

@ -1,4 +1,4 @@
using LINGYUN.Abp.IdentityServer.WeChat.Official;
using LINGYUN.Abp.Authentication.WeChat;
using LINGYUN.Abp.WeChat.Official;
using Microsoft.AspNetCore.Authentication.OAuth;
using Microsoft.AspNetCore.WebUtilities;
@ -168,12 +168,12 @@ namespace Microsoft.AspNetCore.Authentication.WeChat.Official
var isWeChatBrewserRequest = IsWeChatBrowser();
var scope = isWeChatBrewserRequest
? WeChatOfficialOAuthConsts.UserInfoScope
? AbpAuthenticationWeChatConsts.UserInfoScope
: FormatScope();
var endPoint = isWeChatBrewserRequest
? Options.AuthorizationEndpoint
: WeChatOfficialOAuthConsts.QrConnectEndpoint;
: AbpAuthenticationWeChatConsts.QrConnectEndpoint;
var challengeUrl = QueryHelpers.AddQueryString(endPoint, new Dictionary<string, string>
{

16
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/Microsoft/AspNetCore/Authentication/WeChat/Official/WeChatOfficialOAuthOptions.cs → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/Microsoft/AspNetCore/Authentication/WeChat/Official/WeChatOfficialOAuthOptions.cs

@ -1,4 +1,4 @@
using LINGYUN.Abp.IdentityServer.WeChat.Official;
using LINGYUN.Abp.Authentication.WeChat;
using LINGYUN.Abp.WeChat.Security.Claims;
using Microsoft.AspNetCore.Authentication.OAuth;
using Microsoft.AspNetCore.Http;
@ -15,15 +15,15 @@ namespace Microsoft.AspNetCore.Authentication.WeChat.Official
ClientId = "WeChatOfficial";
ClientSecret = "WeChatOfficial";
ClaimsIssuer = WeChatOfficialOAuthConsts.ProviderKey;
CallbackPath = new PathString(WeChatOfficialOAuthConsts.CallbackPath);
ClaimsIssuer = AbpAuthenticationWeChatConsts.ProviderKey;
CallbackPath = new PathString(AbpAuthenticationWeChatConsts.CallbackPath);
AuthorizationEndpoint = WeChatOfficialOAuthConsts.AuthorizationEndpoint;
TokenEndpoint = WeChatOfficialOAuthConsts.TokenEndpoint;
UserInformationEndpoint = WeChatOfficialOAuthConsts.UserInformationEndpoint;
AuthorizationEndpoint = AbpAuthenticationWeChatConsts.AuthorizationEndpoint;
TokenEndpoint = AbpAuthenticationWeChatConsts.TokenEndpoint;
UserInformationEndpoint = AbpAuthenticationWeChatConsts.UserInformationEndpoint;
Scope.Add(WeChatOfficialOAuthConsts.LoginScope);
Scope.Add(WeChatOfficialOAuthConsts.UserInfoScope);
Scope.Add(AbpAuthenticationWeChatConsts.LoginScope);
Scope.Add(AbpAuthenticationWeChatConsts.UserInfoScope);
// 这个原始的属性一定要写进去,框架与UserLogin.ProviderKey进行关联判断是否绑定微信
ClaimActions.MapJsonKey(ClaimTypes.NameIdentifier, "openid");

0
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/Microsoft/AspNetCore/Authentication/WeChat/Official/WeChatOfficialStateCacheItem.cs → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/Microsoft/AspNetCore/Authentication/WeChat/Official/WeChatOfficialStateCacheItem.cs

4
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/Microsoft/AspNetCore/Authentication/WeChatAuthenticationExtensions.cs → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/Microsoft/AspNetCore/Authentication/WeChatAuthenticationExtensions.cs

@ -1,4 +1,4 @@
using LINGYUN.Abp.IdentityServer.WeChat.Official;
using LINGYUN.Abp.Authentication.WeChat;
using LINGYUN.Abp.WeChat;
using Microsoft.AspNetCore.Authentication.WeChat.Official;
using Microsoft.Extensions.DependencyInjection;
@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Authentication
return builder
.AddWeChat(
authenticationScheme,
WeChatOfficialOAuthConsts.DisplayName,
AbpAuthenticationWeChatConsts.DisplayName,
configureOptions);
}

4
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/Microsoft/AspNetCore/Builder/IdentityServerApplicationBuilderExtensions.cs → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/Microsoft/AspNetCore/Builder/IdentityServerApplicationBuilderExtensions.cs

@ -1,5 +1,5 @@
using LINGYUN.Abp.IdentityServer.WeChat.Official;
using Microsoft.AspNetCore.Http;
namespace Microsoft.AspNetCore.Builder
{
public static class IdentityServerApplicationBuilderExtensions

3
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/Official/WeChatOfficialSignatureMiddleware.cs → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/Microsoft/AspNetCore/Http/WeChatOfficialSignatureMiddleware.cs

@ -1,12 +1,11 @@
using LINGYUN.Abp.WeChat.Official;
using Microsoft.AspNetCore.Http;
using System;
using System.Collections;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.DependencyInjection;
namespace LINGYUN.Abp.IdentityServer.WeChat.Official
namespace Microsoft.AspNetCore.Http
{
public class WeChatOfficialSignatureMiddleware : IMiddleware, ITransientDependency
{

0
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/System/BytesExtensions.cs → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/System/BytesExtensions.cs

0
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/System/StringExtensions.cs → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/System/StringExtensions.cs

0
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/System/Text/Json/JsonElementExtensions.cs → aspnet-core/modules/authentication/LINGYUN.Abp.Authentication.WeChat/System/Text/Json/JsonElementExtensions.cs

2
aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN.Abp.Cli.csproj

@ -5,7 +5,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<Version>5.3.4</Version>
<Version>6.0.0</Version>
<Copyright>colin</Copyright>
<Description>Use LINGYUN.MicroService.Templates command line</Description>
<PackAsTool>true</PackAsTool>

8
aspnet-core/modules/common/LINGYUN.Abp.AspNetCore.Mvc.Client/LINGYUN/Abp/AspNetCore/Mvc/Client/MvcCachedApplicationConfigurationClient.cs

@ -16,8 +16,7 @@ namespace LINGYUN.Abp.AspNetCore.Mvc.Client
{
[ExposeServices(
typeof(MvcCachedApplicationConfigurationClient),
typeof(ICachedApplicationConfigurationClient),
typeof(IAsyncInitialize)
typeof(ICachedApplicationConfigurationClient)
)]
public class MvcCachedApplicationConfigurationClient : ICachedApplicationConfigurationClient, ITransientDependency
{
@ -41,11 +40,6 @@ namespace LINGYUN.Abp.AspNetCore.Mvc.Client
Options = options.Value;
}
public async Task InitializeAsync()
{
await GetAsync();
}
public async Task<ApplicationConfigurationDto> GetAsync()
{
var cacheKey = CreateCacheKey();

5
aspnet-core/modules/common/LINGYUN.Abp.BackgroundWorkers.Hangfire/LINGYUN/Abp/BackgroundWorkers/Hangfire/HangfireBackgroundWorkerAdapter.cs

@ -1,4 +1,5 @@
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.BackgroundWorkers;
@ -16,10 +17,10 @@ namespace LINGYUN.Abp.BackgroundWorkers.Hangfire
_doWorkMethod = typeof(TWorker).GetMethod("DoWork", BindingFlags.Instance | BindingFlags.NonPublic);
}
public async virtual Task ExecuteAsync()
public async virtual Task ExecuteAsync(CancellationToken cancellationToken = default)
{
var worker = (IBackgroundWorker)ServiceProvider.GetService(typeof(TWorker));
var workerContext = new PeriodicBackgroundWorkerContext(ServiceProvider);
var workerContext = new PeriodicBackgroundWorkerContext(ServiceProvider, cancellationToken);
switch (worker)
{

4
aspnet-core/modules/common/LINGYUN.Abp.BackgroundWorkers.Hangfire/LINGYUN/Abp/BackgroundWorkers/Hangfire/HangfireBackgroundWorkerManager.cs

@ -20,7 +20,7 @@ namespace LINGYUN.Abp.BackgroundWorkers.Hangfire
ServiceProvider = serviceProvider;
}
public Task AddAsync(IBackgroundWorker worker)
public Task AddAsync(IBackgroundWorker worker, CancellationToken cancellationToken = default)
{
var timer = worker.GetType()
.GetProperty("Timer", BindingFlags.NonPublic | BindingFlags.Instance)?
@ -46,7 +46,7 @@ namespace LINGYUN.Abp.BackgroundWorkers.Hangfire
RecurringJob.AddOrUpdate(
recurringJobId: worker.GetType().FullName,
methodCall: () => workerAdapter.ExecuteAsync(),
methodCall: () => workerAdapter.ExecuteAsync(cancellationToken),
cronExpression: CronGenerator.FormMilliseconds(period.Value));
return Task.CompletedTask;

5
aspnet-core/modules/common/LINGYUN.Abp.BackgroundWorkers.Hangfire/LINGYUN/Abp/BackgroundWorkers/Hangfire/IHangfireBackgroundWorkerAdapter.cs

@ -1,10 +1,11 @@
using System.Threading.Tasks;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.BackgroundWorkers;
namespace LINGYUN.Abp.BackgroundWorkers.Hangfire
{
public interface IHangfireBackgroundWorkerAdapter : IBackgroundWorker
{
Task ExecuteAsync();
Task ExecuteAsync(CancellationToken cancellationToken = default);
}
}

5
aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPConsumerServiceSelector.cs

@ -1,6 +1,7 @@
using DotNetCore.CAP;
using DotNetCore.CAP.Internal;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
@ -56,6 +57,8 @@ namespace LINGYUN.Abp.EventBus.CAP
base.FindConsumersFromInterfaceTypes(provider).ToList();
//handlers
var handlers = AbpDistributedEventBusOptions.Handlers;
var logger = provider.GetRequiredService<ILogger<AbpCAPConsumerServiceSelector>>();
var consumerExecutorDescriptorComparer = new ConsumerExecutorDescriptorComparer(logger);
foreach (var handler in handlers)
{
@ -73,7 +76,7 @@ namespace LINGYUN.Abp.EventBus.CAP
foreach (var consumerExecutorDescriptor in consumerExecutorDescriptors)
{
if (executorDescriptorList.Any(x => new ConsumerExecutorDescriptorComparer().Equals(x, consumerExecutorDescriptor)))
if (executorDescriptorList.Any(x => consumerExecutorDescriptorComparer.Equals(x, consumerExecutorDescriptor)))
{
// 如果存在多个消费者,后续的消费者需要重新定义分组才能不被 CAP 框架过滤掉
var groupAliaName = handler.IsGenericType

40
aspnet-core/modules/common/LINGYUN.Abp.Wrapper/README.md

@ -0,0 +1,40 @@
# LINGYUN.Abp.Wrapper
包装器模块
## 配置使用
```csharp
[DependsOn(typeof(AbpWrapperModule))]
public class YouProjectModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpWrapperOptions>(options =>
{
// 启用包装器
options.IsEnabled = true;
});
}
}
```
## 配置项说明
* AbpWrapperOptions.IsEnabled 是否包装返回结果,默认: false
* AbpWrapperOptions.CodeWithUnhandled 出现未处理异常时的返回错误代码,默认500
* AbpWrapperOptions.CodeWithSuccess 处理成功返回代码,默认0
* AbpWrapperOptions.ErrorWithEmptyResult 请求资源时,如果资源为空是否返回错误消息,默认false
* AbpWrapperOptions.HttpStatusCode 包装后的Http响应代码, 默认: 200
* AbpWrapperOptions.CodeWithEmptyResult 当返回空对象时返回错误代码,默认: 404
* AbpWrapperOptions.MessageWithEmptyResult 当返回空对象时返回错误消息, 默认: Not Found
* AbpWrapperOptions.IgnorePrefixUrls 指定哪些Url开头的地址不需要处理
* AbpWrapperOptions.IgnoreNamespaces 指定哪些命名空间开头不需要处理
* AbpWrapperOptions.IgnoreControllers 指定哪些控制器不需要处理
* AbpWrapperOptions.IgnoreReturnTypes 指定哪些返回结果类型不需要处理
* AbpWrapperOptions.IgnoreExceptions 指定哪些异常类型不需要处理
* AbpWrapperOptions.IgnoredInterfaces 指定哪些接口不需要处理(默认实现**IWrapDisabled**接口不进行处理)
## 其他

8
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.QQ/LINGYUN/Abp/IdentityServer/QQ/AbpIdentityServerQQConsts.cs

@ -1,8 +0,0 @@
namespace LINGYUN.Abp.IdentityServer.QQ;
public static class AbpIdentityServerQQConsts
{
public static string AuthenticationScheme { get; set; } = "QQ Connect";
public static string DisplayName { get; set; } = "QQ Connect";
public static string CallbackPath { get; set; } = "/signin-qq";
}

26
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN.Abp.IdentityServer.WeChat.csproj

@ -1,26 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\common.props" />
<Import Project="..\..\..\configureawait.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="LINGYUN\Abp\IdentityServer\WeChat\Localization\en.json" />
<EmbeddedResource Include="LINGYUN\Abp\IdentityServer\WeChat\Localization\zh-Hans.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.IdentityServer.Domain" Version="$(VoloAbpPackageVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\wechat\LINGYUN.Abp.Identity.WeChat\LINGYUN.Abp.Identity.WeChat.csproj" />
<ProjectReference Include="..\..\wechat\LINGYUN.Abp.WeChat.MiniProgram\LINGYUN.Abp.WeChat.MiniProgram.csproj" />
<ProjectReference Include="..\..\wechat\LINGYUN.Abp.WeChat.Official\LINGYUN.Abp.WeChat.Official.csproj" />
</ItemGroup>
</Project>

56
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/AbpIdentityServerWeChatModule.cs

@ -1,56 +0,0 @@
using LINGYUN.Abp.Identity.WeChat;
using LINGYUN.Abp.IdentityServer.WeChat.MiniProgram;
using LINGYUN.Abp.IdentityServer.WeChat.Official;
using LINGYUN.Abp.WeChat.MiniProgram;
using LINGYUN.Abp.WeChat.Official;
using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.DependencyInjection;
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.WeChat
{
[DependsOn(
typeof(AbpWeChatOfficialModule),
typeof(AbpWeChatMiniProgramModule),
typeof(AbpIdentityWeChatModule),
typeof(AbpIdentityServerDomainModule))]
public class AbpIdentityServerWeChatModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
var configuration = context.Services.GetConfiguration();
PreConfigure<IIdentityServerBuilder>(builder =>
{
builder.AddProfileService<WeChatMiniProgramProfileService>();
// TODO: 两个类型不通用配置项,不然只需要一个
builder.AddExtensionGrantValidator<WeChatMiniProgramGrantValidator>();
builder.AddExtensionGrantValidator<WeChatOfficialGrantValidator>();
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<AbpIdentityServerWeChatModule>();
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<AbpIdentityServerResource>()
.AddVirtualJson("/LINGYUN/Abp/IdentityServer/WeChat/Localization");
});
context.Services
.AddAuthentication()
.AddWeChat();
}
}
}

75
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/MiniProgram/WeChatMiniProgramGrantValidator.cs

@ -1,75 +0,0 @@
using IdentityServer4.Models;
using IdentityServer4.Services;
using IdentityServer4.Validation;
using LINGYUN.Abp.WeChat.Localization;
using LINGYUN.Abp.WeChat.MiniProgram;
using LINGYUN.Abp.WeChat.MiniProgram.Features;
using LINGYUN.Abp.WeChat.OpenId;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Localization;
using System.Threading.Tasks;
using Volo.Abp.Features;
using Volo.Abp.Identity;
using Volo.Abp.IdentityServer.Localization;
using IdentityUser = Volo.Abp.Identity.IdentityUser;
namespace LINGYUN.Abp.IdentityServer.WeChat.MiniProgram
{
/// <summary>
/// 对于小程序绑定用户的扩展授权验证器
/// </summary>
public class WeChatMiniProgramGrantValidator : WeChatGrantValidator
{
public override string GrantType => AbpWeChatMiniProgramConsts.GrantType;
public override string LoginProvider => AbpWeChatMiniProgramConsts.ProviderName;
public override string AuthenticationMethod => AbpWeChatMiniProgramConsts.AuthenticationMethod;
protected AbpWeChatMiniProgramOptionsFactory MiniProgramOptionsFactory { get; }
protected IFeatureChecker FeatureChecker => ServiceProvider.LazyGetRequiredService<IFeatureChecker>();
public WeChatMiniProgramGrantValidator(
IEventService eventService,
IWeChatOpenIdFinder weChatOpenIdFinder,
UserManager<IdentityUser> userManager,
IIdentityUserRepository userRepository,
IdentitySecurityLogManager identitySecurityLogManager,
IStringLocalizer<Volo.Abp.Identity.Localization.IdentityResource> identityLocalizer,
IStringLocalizer<AbpIdentityServerResource> identityServerLocalizer,
IStringLocalizer<WeChatResource> wechatLocalizer,
AbpWeChatMiniProgramOptionsFactory miniProgramOptionsFactory)
: base(
eventService,
weChatOpenIdFinder,
userManager,
userRepository,
identitySecurityLogManager,
wechatLocalizer,
identityLocalizer,
identityServerLocalizer)
{
MiniProgramOptionsFactory = miniProgramOptionsFactory;
}
protected override async Task<bool> CheckFeatureAsync(ExtensionGrantValidationContext context)
{
if (!await FeatureChecker.IsEnabledAsync(WeChatMiniProgramFeatures.EnableAuthorization))
{
context.Result = new GrantValidationResult(
TokenRequestErrors.InvalidGrant,
WeChatLocalizer["MiniProgramAuthorizationDisabledMessage"]);
return false;
}
return true;
}
protected override async Task<WeChatOpenId> FindOpenIdAsync(string code)
{
var options = await MiniProgramOptionsFactory.CreateAsync();
return await WeChatOpenIdFinder.FindAsync(code, options.AppId, options.AppSecret);
}
}
}

67
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/MiniProgram/WeChatMiniProgramProfileService.cs

@ -1,67 +0,0 @@
using IdentityServer4.AspNetIdentity;
using IdentityServer4.Models;
using LINGYUN.Abp.WeChat.Security.Claims;
using Microsoft.AspNetCore.Identity;
using System.Linq;
using System.Security.Principal;
using System.Threading.Tasks;
using Volo.Abp.Identity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Uow;
using IdentityUser = Volo.Abp.Identity.IdentityUser;
namespace LINGYUN.Abp.IdentityServer.WeChat.MiniProgram
{
public class WeChatMiniProgramProfileService : ProfileService<IdentityUser>
{
protected ICurrentTenant CurrentTenant { get; }
public WeChatMiniProgramProfileService(
IdentityUserManager userManager,
IUserClaimsPrincipalFactory<IdentityUser> claimsFactory,
ICurrentTenant currentTenant)
: base(userManager, claimsFactory)
{
CurrentTenant = currentTenant;
}
[UnitOfWork]
public override async Task GetProfileDataAsync(ProfileDataRequestContext context)
{
using (CurrentTenant.Change(context.Subject.FindTenantId()))
{
await base.GetProfileDataAsync(context);
// TODO: 可以从令牌获取openid, 安全性呢?
TryAddWeChatClaim(context, AbpWeChatClaimTypes.OpenId);
TryAddWeChatClaim(context, AbpWeChatClaimTypes.UnionId);
}
}
[UnitOfWork]
public override async Task IsActiveAsync(IsActiveContext context)
{
using (CurrentTenant.Change(context.Subject.FindTenantId()))
{
await base.IsActiveAsync(context);
}
}
[UnitOfWork]
public override Task<bool> IsUserActiveAsync(IdentityUser user)
{
return Task.FromResult(user.IsActive);
}
protected virtual void TryAddWeChatClaim(ProfileDataRequestContext context, string weChatClaimType)
{
if (context.RequestedClaimTypes.Any(rc => rc.Contains(weChatClaimType)))
{
var weChatClaim = context.Subject.FindFirst(weChatClaimType);
if (weChatClaim != null)
{
context.IssuedClaims.Add(weChatClaim);
}
}
}
}
}

75
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/Official/WeChatOfficialGrantValidator.cs

@ -1,75 +0,0 @@
using IdentityServer4.Models;
using IdentityServer4.Services;
using IdentityServer4.Validation;
using LINGYUN.Abp.WeChat.Localization;
using LINGYUN.Abp.WeChat.Official;
using LINGYUN.Abp.WeChat.Official.Features;
using LINGYUN.Abp.WeChat.OpenId;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Localization;
using System.Threading.Tasks;
using Volo.Abp.Features;
using Volo.Abp.Identity;
using Volo.Abp.IdentityServer.Localization;
using IdentityUser = Volo.Abp.Identity.IdentityUser;
namespace LINGYUN.Abp.IdentityServer.WeChat.Official
{
/// <summary>
/// 对于公众平台绑定用户的扩展授权验证器
/// </summary>
public class WeChatOfficialGrantValidator : WeChatGrantValidator
{
public override string GrantType => AbpWeChatOfficialConsts.GrantType;
public override string LoginProvider => AbpWeChatOfficialConsts.ProviderName;
public override string AuthenticationMethod => AbpWeChatOfficialConsts.AuthenticationMethod;
protected AbpWeChatOfficialOptionsFactory WeChatOfficialOptionsFactory { get; }
protected IFeatureChecker FeatureChecker => ServiceProvider.LazyGetRequiredService<IFeatureChecker>();
public WeChatOfficialGrantValidator(
IEventService eventService,
IWeChatOpenIdFinder weChatOpenIdFinder,
UserManager<IdentityUser> userManager,
IIdentityUserRepository userRepository,
IdentitySecurityLogManager identitySecurityLogManager,
IStringLocalizer<Volo.Abp.Identity.Localization.IdentityResource> identityLocalizer,
IStringLocalizer<AbpIdentityServerResource> identityServerLocalizer,
IStringLocalizer<WeChatResource> wechatLocalizer,
AbpWeChatOfficialOptionsFactory weChatOfficialOptionsFactory)
: base(
eventService,
weChatOpenIdFinder,
userManager,
userRepository,
identitySecurityLogManager,
wechatLocalizer,
identityLocalizer,
identityServerLocalizer)
{
WeChatOfficialOptionsFactory = weChatOfficialOptionsFactory;
}
protected override async Task<bool> CheckFeatureAsync(ExtensionGrantValidationContext context)
{
if (!await FeatureChecker.IsEnabledAsync(WeChatOfficialFeatures.EnableAuthorization))
{
context.Result = new GrantValidationResult(
TokenRequestErrors.InvalidGrant,
WeChatLocalizer["OfficialAuthorizationDisabledMessage"]);
return false;
}
return true;
}
protected override async Task<WeChatOpenId> FindOpenIdAsync(string code)
{
var options = await WeChatOfficialOptionsFactory.CreateAsync();
return await WeChatOpenIdFinder.FindAsync(code, options.AppId, options.AppSecret);
}
}
}

71
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/Official/WeChatOfficialOAuthConsts.cs

@ -1,71 +0,0 @@
using LINGYUN.Abp.WeChat;
using LINGYUN.Abp.WeChat.Official;
namespace LINGYUN.Abp.IdentityServer.WeChat.Official
{
/// <summary>
/// 与微信公众号认证相关的静态(可变)常量
/// </summary>
public static class WeChatOfficialOAuthConsts
{
/// <summary>
/// 微信个人信息标识
/// </summary>
public static string ProfileKey { get; set; } = "wechat.profile";
/// <summary>
/// 微信提供者标识
/// </summary>
public static string ProviderKey => AbpWeChatOfficialConsts.ProviderName;
/// <summary>
/// 微信提供者显示名称
/// </summary>
public static string DisplayName => AbpWeChatGlobalConsts.DisplayName;
/// <summary>
/// 回调地址
/// </summary>
public static string CallbackPath { get; set; } = "/signin-wechat";
/// <summary>
/// 微信客户端外的网页登录
/// </summary>
public const string QrConnectEndpoint = "https://open.weixin.qq.com/connect/qrconnect";
/// <summary>
/// 微信客户端内的网页登录
/// </summary>
public const string AuthorizationEndpoint = "https://open.weixin.qq.com/connect/oauth2/authorize";
/// <summary>
/// 用户允许授权后通过返回的code换取access_token地址
/// </summary>
public const string TokenEndpoint = "https://api.weixin.qq.com/sns/oauth2/access_token";
/// <summary>
/// 使用access_token获取用户个人信息地址
/// </summary>
public const string UserInformationEndpoint = "https://api.weixin.qq.com/sns/userinfo";
/// <summary>
/// 弹出授权页面,可通过openid拿到昵称、性别、所在地。
/// 并且, 即使在未关注的情况下,只要用户授权,也能获取其信息
/// <br />
/// <br />
/// 详询: <see cref="https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html"/>
/// </summary>
/// <remarks>
/// 以snsapi_userinfo为scope发起的网页授权,是用来获取用户的基本信息的。
/// 但这种授权需要用户手动同意,并且由于用户同意过,所以无须关注,就可在授权后获取该用户的基本信息
/// </remarks>
public const string UserInfoScope = "snsapi_userinfo";
/// <summary>
/// 不弹出授权页面,直接跳转,只能获取用户openid
/// <br />
/// <br />
/// 详询: <see cref="https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html"/>
/// </summary>
/// <remarks>
/// 以snsapi_base为scope发起的网页授权,是用来获取进入页面的用户的openid的,并且是静默授权并自动跳转到回调页的。
/// 用户感知的就是直接进入了回调页(往往是业务页面)
/// </remarks>
public const string LoginScope = "snsapi_login";
}
}

242
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/WeChatGrantValidator.cs

@ -1,242 +0,0 @@
using IdentityModel;
using IdentityServer4.Events;
using IdentityServer4.Models;
using IdentityServer4.Services;
using IdentityServer4.Validation;
using LINGYUN.Abp.WeChat;
using LINGYUN.Abp.WeChat.Localization;
using LINGYUN.Abp.WeChat.OpenId;
using LINGYUN.Abp.WeChat.Security.Claims;
using LINGYUN.Abp.WeChat.Settings;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using System;
using System.Collections.Generic;
using System.Security.Claims;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Guids;
using Volo.Abp.Identity;
using Volo.Abp.IdentityServer;
using Volo.Abp.IdentityServer.Localization;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Security.Claims;
using Volo.Abp.Settings;
using Volo.Abp.Uow;
using IdentityResource = Volo.Abp.Identity.Localization.IdentityResource;
using IdentityUser = Volo.Abp.Identity.IdentityUser;
namespace LINGYUN.Abp.IdentityServer.WeChat
{
public abstract class WeChatGrantValidator : IExtensionGrantValidator
{
public abstract string GrantType { get; }
public abstract string LoginProvider { get; }
public abstract string AuthenticationMethod { get; }
public ILogger Logger { protected get; set; }
public IAbpLazyServiceProvider ServiceProvider { protected get; set; }
protected IEventService EventService { get; }
protected IWeChatOpenIdFinder WeChatOpenIdFinder { get; }
protected IIdentityUserRepository UserRepository { get; }
protected IdentitySecurityLogManager IdentitySecurityLogManager { get; }
protected UserManager<IdentityUser> UserManager { get; }
protected IStringLocalizer<WeChatResource> WeChatLocalizer { get; }
protected IStringLocalizer<IdentityResource> IdentityLocalizer { get; }
protected IStringLocalizer<AbpIdentityServerResource> IdentityServerLocalizer { get; }
public WeChatGrantValidator(
IEventService eventService,
IWeChatOpenIdFinder weChatOpenIdFinder,
UserManager<IdentityUser> userManager,
IIdentityUserRepository userRepository,
IdentitySecurityLogManager identitySecurityLogManager,
IStringLocalizer<WeChatResource> wechatLocalizer,
IStringLocalizer<IdentityResource> identityLocalizer,
IStringLocalizer<AbpIdentityServerResource> identityServerLocalizer)
{
EventService = eventService;
UserManager = userManager;
UserRepository = userRepository;
IdentitySecurityLogManager = identitySecurityLogManager;
WeChatOpenIdFinder = weChatOpenIdFinder;
WeChatLocalizer = wechatLocalizer;
IdentityLocalizer = identityLocalizer;
IdentityServerLocalizer = identityServerLocalizer;
Logger = NullLogger<WeChatGrantValidator>.Instance;
}
protected abstract Task<WeChatOpenId> FindOpenIdAsync(string code);
[UnitOfWork]
public async Task ValidateAsync(ExtensionGrantValidationContext context)
{
if (!await CheckFeatureAsync(context))
{
return;
}
var raw = context.Request.Raw;
var credential = raw.Get(OidcConstants.TokenRequest.GrantType);
if (credential == null || !credential.Equals(GrantType))
{
Logger.LogWarning("Invalid grant type: not allowed");
context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant, IdentityServerLocalizer["InvalidGrant:GrantTypeInvalid"]);
return;
}
var wechatCode = raw.Get(AbpWeChatGlobalConsts.TokenName);
if (wechatCode.IsNullOrWhiteSpace() || wechatCode.IsNullOrWhiteSpace())
{
Logger.LogWarning("Invalid grant type: wechat code not found");
context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant, IdentityServerLocalizer["InvalidGrant:WeChatCodeNotFound"]);
return;
}
WeChatOpenId wechatOpenId;
try
{
wechatOpenId = await FindOpenIdAsync(wechatCode);
}
catch(AbpWeChatException e)
{
context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant, e.Message);
return;
}
var currentUser = await UserManager.FindByLoginAsync(LoginProvider, wechatOpenId.OpenId);
if (currentUser == null)
{
// 检查是否允许自注册
var settingProvider = ServiceProvider.LazyGetRequiredService<ISettingProvider>();
// TODO 检查启用用户注册是否有必要引用账户模块
if (!await settingProvider.IsTrueAsync("Abp.Account.IsSelfRegistrationEnabled") ||
!await settingProvider.IsTrueAsync(WeChatSettingNames.EnabledQuickLogin))
{
Logger.LogWarning("Invalid grant type: wechat openid not register", wechatOpenId.OpenId);
context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant, IdentityServerLocalizer["InvalidGrant:WeChatNotRegister"]);
return;
}
var guiGenerator = ServiceProvider.LazyGetRequiredService<IGuidGenerator>();
var currentTenant = ServiceProvider.LazyGetRequiredService<ICurrentTenant>();
var userName = "wxid-" + wechatOpenId.OpenId.ToMd5().ToLower();
var userEmail = $"{userName}@{currentTenant.Name ?? "default"}.io";
currentUser = new IdentityUser(guiGenerator.Create(), userName, userEmail, currentTenant.Id);
(await UserManager.CreateAsync(currentUser)).CheckErrors();
(await UserManager.AddLoginAsync(
currentUser,
new UserLoginInfo(
LoginProvider,
wechatOpenId.OpenId,
AbpWeChatGlobalConsts.DisplayName))).CheckErrors();
}
// 检查是否已锁定
if (await UserManager.IsLockedOutAsync(currentUser))
{
Logger.LogInformation("Authentication failed for username: {username}, reason: locked out", currentUser.UserName);
context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant, IdentityLocalizer["Volo.Abp.Identity:UserLockedOut"]);
await SaveSecurityLogAsync(context, currentUser, wechatOpenId, IdentityServerSecurityLogActionConsts.LoginLockedout);
return;
}
await EventService.RaiseAsync(new UserLoginSuccessEvent(currentUser.UserName, wechatOpenId.OpenId, null));
// 登录之后需要更新安全令牌
(await UserManager.UpdateSecurityStampAsync(currentUser)).CheckErrors();
await SetSuccessResultAsync(context, currentUser, wechatOpenId);
}
protected virtual Task<bool> CheckFeatureAsync(ExtensionGrantValidationContext context)
{
return Task.FromResult(true);
}
protected async virtual Task SetSuccessResultAsync(ExtensionGrantValidationContext context, IdentityUser user, WeChatOpenId wechatOpenId)
{
var sub = await UserManager.GetUserIdAsync(user);
Logger.LogInformation("Credentials validated for username: {username}", user.UserName);
var additionalClaims = new List<Claim>();
await AddCustomClaimsAsync(additionalClaims, user, wechatOpenId, context);
context.Result = new GrantValidationResult(
sub,
AuthenticationMethod,
additionalClaims.ToArray()
);
await SaveSecurityLogAsync(
context,
user,
wechatOpenId,
IdentityServerSecurityLogActionConsts.LoginSucceeded);
}
protected async virtual Task SaveSecurityLogAsync(
ExtensionGrantValidationContext context,
IdentityUser user,
WeChatOpenId wechatOpenId,
string action)
{
var logContext = new IdentitySecurityLogContext
{
Identity = IdentityServerSecurityLogIdentityConsts.IdentityServer,
Action = action,
UserName = user.UserName,
ClientId = await FindClientIdAsync(context)
};
logContext.WithProperty("GrantType", GrantType);
logContext.WithProperty("Provider", LoginProvider);
logContext.WithProperty("Method", AuthenticationMethod);
await IdentitySecurityLogManager.SaveAsync(logContext);
}
protected virtual Task<string> FindClientIdAsync(ExtensionGrantValidationContext context)
{
return Task.FromResult(context.Request?.Client?.ClientId);
}
protected virtual Task AddCustomClaimsAsync(
List<Claim> customClaims,
IdentityUser user,
WeChatOpenId wechatOpenId,
ExtensionGrantValidationContext context)
{
if (user.TenantId.HasValue)
{
customClaims.Add(
new Claim(
AbpClaimTypes.TenantId,
user.TenantId?.ToString()
)
);
}
customClaims.Add(
new Claim(
AbpWeChatClaimTypes.OpenId,
wechatOpenId.OpenId));
if (!wechatOpenId.UnionId.IsNullOrWhiteSpace())
{
customClaims.Add(
new Claim(
AbpWeChatClaimTypes.UnionId,
wechatOpenId.UnionId));
}
return Task.CompletedTask;
}
}
}

3
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

25
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN.Abp.OpenIddict.Application.Contracts.csproj

@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\common.props" />
<Import Project="..\..\..\configureawait.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<None Remove="LINGYUN\Abp\OpenIddict\Localization\Resources\*.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="LINGYUN\Abp\OpenIddict\Localization\Resources\*.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Authorization.Abstractions" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.OpenIddict.Domain.Shared" Version="$(VoloAbpPackageVersion)" />
</ItemGroup>
</Project>

29
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/AbpOpenIddictApplicationContractsModule.cs

@ -0,0 +1,29 @@
using Volo.Abp.Authorization;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.OpenIddict;
using Volo.Abp.OpenIddict.Localization;
using Volo.Abp.VirtualFileSystem;
namespace LINGYUN.Abp.OpenIddict;
[DependsOn(
typeof(AbpAuthorizationAbstractionsModule),
typeof(AbpOpenIddictDomainSharedModule))]
public class AbpOpenIddictApplicationContractsModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<AbpOpenIddictApplicationContractsModule>();
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<AbpOpenIddictResource>()
.AddVirtualJson("/LINGYUN/Abp/OpenIddict/Localization/Resources");
});
}
}

14
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Applications/IOpenIddictApplicationAppService.cs

@ -0,0 +1,14 @@
using System;
using Volo.Abp.Application.Services;
namespace LINGYUN.Abp.OpenIddict.Applications;
public interface IOpenIddictApplicationAppService :
ICrudAppService<
OpenIddictApplicationDto,
Guid,
OpenIddictApplicationGetListInput,
OpenIddictApplicationCreateDto,
OpenIddictApplicationUpdateDto>
{
}

8
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Applications/OpenIddictApplicationCreateDto.cs

@ -0,0 +1,8 @@
using System;
namespace LINGYUN.Abp.OpenIddict.Applications;
[Serializable]
public class OpenIddictApplicationCreateDto : OpenIddictApplicationCreateOrUpdateDto
{
}

43
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Applications/OpenIddictApplicationCreateOrUpdateDto.cs

@ -0,0 +1,43 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.ObjectExtending;
using Volo.Abp.OpenIddict.Applications;
using Volo.Abp.Validation;
namespace LINGYUN.Abp.OpenIddict.Applications;
public abstract class OpenIddictApplicationCreateOrUpdateDto : ExtensibleObject
{
[Required]
[DynamicStringLength(typeof(OpenIddictApplicationConsts), nameof(OpenIddictApplicationConsts.ClientIdMaxLength))]
public string ClientId { get; set; }
public string ClientSecret { get; set; }
[DynamicStringLength(typeof(OpenIddictApplicationConsts), nameof(OpenIddictApplicationConsts.ConsentTypeMaxLength))]
public string ConsentType { get; set; }
public string DisplayName { get; set; }
public Dictionary<string, string> DisplayNames { get; set; } = new Dictionary<string, string>();
public List<string> Endpoints { get; set; } = new List<string>();
public List<string> GrantTypes { get; set; } = new List<string>();
public List<string> ResponseTypes { get; set; } = new List<string>();
public List<string> Scopes { get; set; } = new List<string>();
public List<string> PostLogoutRedirectUris { get; set; } = new List<string>();
public Dictionary<string, string> Properties { get; set; } = new Dictionary<string, string>();
public List<string> RedirectUris { get; set; } = new List<string>();
public List<string> Requirements { get; set; } = new List<string>();
[DynamicStringLength(typeof(OpenIddictApplicationConsts), nameof(OpenIddictApplicationConsts.TypeMaxLength))]
public string Type { get; set; }
public string ClientUri { get; set; }
public string LogoUri { get; set; }
}

26
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Applications/OpenIddictApplicationDto.cs

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.OpenIddict.Applications;
[Serializable]
public class OpenIddictApplicationDto : ExtensibleAuditedEntityDto<Guid>
{
public string ClientId { get; set; }
public string ClientSecret { get; set; }
public string ConsentType { get; set; }
public string DisplayName { get; set; }
public Dictionary<string, string> DisplayNames { get; set; } = new Dictionary<string, string>();
public List<string> Endpoints { get; set; } = new List<string>();
public List<string> GrantTypes { get; set; } = new List<string>();
public List<string> ResponseTypes { get; set; } = new List<string>();
public List<string> Scopes { get; set; } = new List<string>();
public List<string> PostLogoutRedirectUris { get; set; } = new List<string>();
public Dictionary<string, string> Properties { get; set; } = new Dictionary<string, string>();
public List<string> RedirectUris { get; set; } = new List<string>();
public List<string> Requirements { get; set; } = new List<string>();
public string Type { get; set; }
public string ClientUri { get; set; }
public string LogoUri { get; set; }
}

10
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Applications/OpenIddictApplicationGetListInput.cs

@ -0,0 +1,10 @@
using System;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.OpenIddict.Applications;
[Serializable]
public class OpenIddictApplicationGetListInput : PagedAndSortedResultRequestDto
{
public string Filter { get; set; }
}

8
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Applications/OpenIddictApplicationUpdateDto.cs

@ -0,0 +1,8 @@
using System;
namespace LINGYUN.Abp.OpenIddict.Applications;
[Serializable]
public class OpenIddictApplicationUpdateDto : OpenIddictApplicationCreateOrUpdateDto
{
}

13
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Authorizations/IOpenIddictAuthorizationAppService.cs

@ -0,0 +1,13 @@
using System;
using Volo.Abp.Application.Services;
namespace LINGYUN.Abp.OpenIddict.Authorizations;
public interface IOpenIddictAuthorizationAppService :
IReadOnlyAppService<
OpenIddictAuthorizationDto,
Guid,
OpenIddictAuthorizationGetListInput>,
IDeleteAppService<Guid>
{
}

17
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Authorizations/OpenIddictAuthorizationDto.cs

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.OpenIddict.Authorizations;
[Serializable]
public class OpenIddictAuthorizationDto : ExtensibleAuditedEntityDto<Guid>
{
public Guid? ApplicationId { get; set; }
public DateTime? CreationDate { get; set; }
public Dictionary<string, string> Properties { get; set; } = new Dictionary<string, string>();
public List<string> Scopes { get; set; } = new List<string>();
public string Status { get; set; }
public string Subject { get; set; }
public string Type { get; set; }
}

16
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Authorizations/OpenIddictAuthorizationGetListInput.cs

@ -0,0 +1,16 @@
using System;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.OpenIddict.Authorizations;
[Serializable]
public class OpenIddictAuthorizationGetListInput : PagedAndSortedResultRequestDto
{
public string Filter { get; set; }
public string Subject { get; set; }
public Guid? ClientId { get; set; }
public string Status { get; set; }
public string Type { get; set; }
public DateTime? BeginCreationTime { get; set; }
public DateTime? EndCreationTime { get; set; }
}

44
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Localization/Resources/en.json

@ -0,0 +1,44 @@
{
"culture": "en",
"texts": {
"Permissions:OpenIddict": "OpenIddict",
"Permissions:Applications": "Applications",
"Permissions:Scopes": "Scopes",
"Permissions:Tokens": "Tokens",
"Permissions:Create": "Create",
"Permissions:Update": "Update",
"Permissions:Delete": "Delete",
"Permissions:ManagePermissions": "Manage Permissions",
"OpenIddict:Applications:0001": "The application client id {ClientId} already exists!",
"OpenIddict:Scopes:0001": "The scope name {Name} already exists!",
"DisplayName:ClientId": "Client Id",
"DisplayName:ClientSecret": "Client Secret",
"DisplayName:ConsentType": "Consent Type",
"DisplayName:DisplayName": "Display Name",
"DisplayName:DisplayNames": "Display Names",
"DisplayName:Permissions": "Permissions",
"DisplayName:PostLogoutRedirectUris": "Post Logout Redirect Uris",
"DisplayName:Properties": "Properties",
"DisplayName:RedirectUris": "Redirect Uris",
"DisplayName:Requirements": "Requirements",
"DisplayName:Type": "Type",
"DisplayName:ClientUri": "Client Uri",
"DisplayName:LogoUri": "Logo",
"DisplayName:ApplicationId": "Application Id",
"DisplayName:CreationDate": "Creation Date",
"DisplayName:Scopes": "Scopes",
"DisplayName:Status": "Status",
"DisplayName:Subject": "Subject",
"DisplayName:Description": "Description",
"DisplayName:Descriptions": "Descriptions",
"DisplayName:Name": "Name",
"DisplayName:Resources": "Resources",
"DisplayName:AuthorizationId": "Authorization Id",
"DisplayName:ExpirationDate": "Expiration Date",
"DisplayName:Payload": "Payload",
"DisplayName:RedemptionDate": "Redemption Date",
"DisplayName:ReferenceId": "Reference Id",
"DisplayName:LastModificationTime": "Modify time",
"DisplayName:CreationTime": "Creation time"
}
}

44
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Localization/Resources/zh-Hans.json

@ -0,0 +1,44 @@
{
"culture": "zh-Hans",
"texts": {
"Permissions:OpenIddict": "OpenIddict",
"Permissions:Applications": "应用",
"Permissions:Scopes": "范围",
"Permissions:Tokens": "令牌",
"Permissions:Create": "创建",
"Permissions:Update": "编辑",
"Permissions:Delete": "删除",
"Permissions:ManagePermissions": "管理权限",
"OpenIddict:Applications:0001": "应用标识 {ClientId} 已经存在!",
"OpenIddict:Scopes:0001": "范围名称 {Name} 已经存在!",
"DisplayName:ClientId": "客户端标识",
"DisplayName:ClientSecret": "客户端密钥",
"DisplayName:ConsentType": "同意类型",
"DisplayName:DisplayName": "显示名称",
"DisplayName:DisplayNames": "显示名称",
"DisplayName:Permissions": "权限",
"DisplayName:PostLogoutRedirectUris": "注销后重定向Uri",
"DisplayName:Properties": "属性",
"DisplayName:RedirectUris": "重定向Uri",
"DisplayName:Requirements": "需求",
"DisplayName:Type": "类型",
"DisplayName:ClientUri": "客户端Uri",
"DisplayName:LogoUri": "客户端Logo",
"DisplayName:ApplicationId": "应用标识",
"DisplayName:CreationDate": "创建日期",
"DisplayName:Scopes": "范围",
"DisplayName:Status": "状态",
"DisplayName:Subject": "主体",
"DisplayName:Description": "描述",
"DisplayName:Descriptions": "描述",
"DisplayName:Name": "名称",
"DisplayName:Resources": "资源",
"DisplayName:AuthorizationId": "授权标识",
"DisplayName:ExpirationDate": "过期时间",
"DisplayName:Payload": "有效载荷",
"DisplayName:RedemptionDate": "偿还时间",
"DisplayName:ReferenceId": "引用标识",
"DisplayName:LastModificationTime": "修改时间",
"DisplayName:CreationTime": "创建时间"
}
}

26
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/OpenIddictApplicationErrorCodes.cs

@ -0,0 +1,26 @@
namespace LINGYUN.Abp.OpenIddict;
public static class OpenIddictApplicationErrorCodes
{
private const string Namespace = "OpenIddict:";
public static class Applications
{
public const string ClientIdExisted = Namespace + "Applications:0001";
}
public static class Authorizations
{
}
public static class Scopes
{
public const string NameExisted = Namespace + "Scopes:0001";
}
public static class Tokens
{
}
}

8
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/OpenIddictRemoteServiceConsts.cs

@ -0,0 +1,8 @@
namespace LINGYUN.Abp.OpenIddict;
public class OpenIddictRemoteServiceConsts
{
public const string RemoteServiceName = "AbpOpenIddict";
public const string ModuleName = "openiddict";
}

84
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Permissions/AbpOpenIddictPermissionDefinitionProvider.cs

@ -0,0 +1,84 @@
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Localization;
using Volo.Abp.MultiTenancy;
using Volo.Abp.OpenIddict.Localization;
namespace LINGYUN.Abp.OpenIddict.Permissions
{
public class AbpIdentityServerPermissionDefinitionProvider : PermissionDefinitionProvider
{
public override void Define(IPermissionDefinitionContext context)
{
var openIddictGroup = context.GetGroupOrNull(AbpOpenIddictPermissions.GroupName);
if (openIddictGroup == null)
{
openIddictGroup = context
.AddGroup(
name: AbpOpenIddictPermissions.GroupName,
displayName: L("Permissions:OpenIddict"),
multiTenancySide: MultiTenancySides.Host);
}
var applications = openIddictGroup.AddPermission(
AbpOpenIddictPermissions.Applications.Default,
L("Permissions:Applications"),
MultiTenancySides.Host);
applications.AddChild(
AbpOpenIddictPermissions.Applications.Create,
L("Permissions:Create"),
MultiTenancySides.Host);
applications.AddChild(
AbpOpenIddictPermissions.Applications.Update,
L("Permissions:Update"),
MultiTenancySides.Host);
applications.AddChild(
AbpOpenIddictPermissions.Applications.Delete,
L("Permissions:Delete"),
MultiTenancySides.Host);
applications.AddChild(
AbpOpenIddictPermissions.Applications.ManagePermissions,
L("Permissions:ManagePermissions"),
MultiTenancySides.Host);
var authorizations = openIddictGroup.AddPermission(
AbpOpenIddictPermissions.Authorizations.Default,
L("Permissions:Authorizations"),
MultiTenancySides.Host);
authorizations.AddChild(
AbpOpenIddictPermissions.Authorizations.Delete,
L("Permissions:Delete"),
MultiTenancySides.Host);
var scopes = openIddictGroup.AddPermission(
AbpOpenIddictPermissions.Scopes.Default,
L("Permissions:Scopes"),
MultiTenancySides.Host);
scopes.AddChild(
AbpOpenIddictPermissions.Scopes.Create,
L("Permissions:Create"),
MultiTenancySides.Host);
scopes.AddChild(
AbpOpenIddictPermissions.Scopes.Update,
L("Permissions:Update"),
MultiTenancySides.Host);
scopes.AddChild(
AbpOpenIddictPermissions.Scopes.Delete,
L("Permissions:Delete"),
MultiTenancySides.Host);
var tokens = openIddictGroup.AddPermission(
AbpOpenIddictPermissions.Tokens.Default,
L("Permissions:Tokens"),
MultiTenancySides.Host);
tokens.AddChild(
AbpOpenIddictPermissions.Tokens.Delete,
L("Permissions:Delete"),
MultiTenancySides.Host);
}
protected virtual LocalizableString L(string name)
{
return LocalizableString.Create<AbpOpenIddictResource>(name);
}
}
}

36
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Permissions/AbpOpenIddictPermissions.cs

@ -0,0 +1,36 @@
namespace LINGYUN.Abp.OpenIddict.Permissions
{
public class AbpOpenIddictPermissions
{
public const string GroupName = "AbpOpenIddict";
public static class Applications
{
public const string Default = GroupName + ".Applications";
public const string Create = Default + ".Create";
public const string Update = Default + ".Update";
public const string Delete = Default + ".Delete";
public const string ManagePermissions = Default + ".ManagePermissions";
}
public static class Authorizations
{
public const string Default = GroupName + ".Authorizations";
public const string Delete = Default + ".Delete";
}
public static class Scopes
{
public const string Default = GroupName + ".Scopes";
public const string Create = Default + ".Create";
public const string Update = Default + ".Update";
public const string Delete = Default + ".Delete";
}
public static class Tokens
{
public const string Default = GroupName + ".Tokens";
public const string Delete = Default + ".Delete";
}
}
}

14
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Scopes/IOpenIddictScopeAppService.cs

@ -0,0 +1,14 @@
using System;
using Volo.Abp.Application.Services;
namespace LINGYUN.Abp.OpenIddict.Scopes;
public interface IOpenIddictScopeAppService :
ICrudAppService<
OpenIddictScopeDto,
Guid,
OpenIddictScopeGetListInput,
OpenIddictScopeCreateDto,
OpenIddictScopeUpdateDto>
{
}

8
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Scopes/OpenIddictScopeCreateDto.cs

@ -0,0 +1,8 @@
using System;
namespace LINGYUN.Abp.OpenIddict.Scopes;
[Serializable]
public class OpenIddictScopeCreateDto : OpenIddictScopeCreateOrUpdateDto
{
}

27
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Scopes/OpenIddictScopeCreateOrUpdateDto.cs

@ -0,0 +1,27 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.ObjectExtending;
using Volo.Abp.OpenIddict.Scopes;
using Volo.Abp.Validation;
namespace LINGYUN.Abp.OpenIddict.Scopes;
public abstract class OpenIddictScopeCreateOrUpdateDto : ExtensibleObject
{
public string Description { get; set; }
public Dictionary<string, string> Descriptions { get; set; } = new Dictionary<string, string>();
public string DisplayName { get; set; }
public Dictionary<string, string> DisplayNames { get; set; } = new Dictionary<string, string>();
[Required]
[DynamicStringLength(typeof(OpenIddictScopeConsts), nameof(OpenIddictScopeConsts.NameMaxLength))]
public string Name { get; set; }
public Dictionary<string, string> Properties { get; set; } = new Dictionary<string, string>();
public List<string> Resources { get; set; }
}

24
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Scopes/OpenIddictScopeDto.cs

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.OpenIddict.Scopes;
[Serializable]
public class OpenIddictScopeDto : ExtensibleAuditedEntityDto<Guid>
{
public string Description { get; set; }
public Dictionary<string, string> Descriptions { get; set; } = new Dictionary<string, string>();
public string DisplayName { get; set; }
public Dictionary<string, string> DisplayNames { get; set; } = new Dictionary<string, string>();
public string Name { get; set; }
public Dictionary<string, string> Properties { get; set; } = new Dictionary<string, string>();
public List<string> Resources { get; set; }
}

10
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Scopes/OpenIddictScopeGetListInput.cs

@ -0,0 +1,10 @@
using System;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.OpenIddict.Scopes;
[Serializable]
public class OpenIddictScopeGetListInput : PagedAndSortedResultRequestDto
{
public string Filter { get; set; }
}

8
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Scopes/OpenIddictScopeUpdateDto.cs

@ -0,0 +1,8 @@
using System;
namespace LINGYUN.Abp.OpenIddict.Scopes;
[Serializable]
public class OpenIddictScopeUpdateDto : OpenIddictScopeCreateOrUpdateDto
{
}

13
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Tokens/IOpenIddictTokenAppService.cs

@ -0,0 +1,13 @@
using System;
using Volo.Abp.Application.Services;
namespace LINGYUN.Abp.OpenIddict.Tokens;
public interface IOpenIddictTokenAppService :
IReadOnlyAppService<
OpenIddictTokenDto,
Guid,
OpenIddictTokenGetListInput>,
IDeleteAppService<Guid>
{
}

30
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Tokens/OpenIddictTokenDto.cs

@ -0,0 +1,30 @@
using System;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.OpenIddict.Tokens;
[Serializable]
public class OpenIddictTokenDto : ExtensibleAuditedEntityDto<Guid>
{
public Guid? ApplicationId { get; set; }
public Guid? AuthorizationId { get; set; }
public DateTime? CreationDate { get; set; }
public DateTime? ExpirationDate { get; set; }
public string Payload { get; set; }
public string Properties { get; set; }
public DateTime? RedemptionDate { get; set; }
public string ReferenceId { get; set; }
public string Status { get; set; }
public string Subject { get; set; }
public string Type { get; set; }
}

20
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Tokens/OpenIddictTokenGetListInput.cs

@ -0,0 +1,20 @@
using System;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.OpenIddict.Tokens;
[Serializable]
public class OpenIddictTokenGetListInput : PagedAndSortedResultRequestDto
{
public string Filter { get; set; }
public Guid? ClientId { get; set; }
public Guid? AuthorizationId { get; set; }
public string Subject { get; set; }
public string Status { get; set; }
public string Type { get; set; }
public string ReferenceId { get; set; }
public DateTime? BeginExpirationDate { get; set; }
public DateTime? EndExpirationDate { get; set; }
public DateTime? BeginCreationTime { get; set; }
public DateTime? EndCreationTime { get; set; }
}

3
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

20
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN.Abp.OpenIddict.Application.csproj

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\common.props" />
<Import Project="..\..\..\configureawait.props" />
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.OpenIddict.Domain" Version="$(VoloAbpPackageVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LINGYUN.Abp.OpenIddict.Application.Contracts\LINGYUN.Abp.OpenIddict.Application.Contracts.csproj" />
</ItemGroup>
</Project>

13
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/AbpOpenIddictApplicationModule.cs

@ -0,0 +1,13 @@
using Volo.Abp.Application;
using Volo.Abp.Modularity;
using Volo.Abp.OpenIddict;
namespace LINGYUN.Abp.OpenIddict;
[DependsOn(
typeof(AbpOpenIddictApplicationContractsModule),
typeof(AbpOpenIddictDomainModule),
typeof(AbpDddApplicationModule))]
public class AbpOpenIddictApplicationModule : AbpModule
{
}

86
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/Applications/OpenIddictApplicationAppService.cs

@ -0,0 +1,86 @@
using LINGYUN.Abp.OpenIddict.Permissions;
using Microsoft.AspNetCore.Authorization;
using System;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.OpenIddict.Applications;
namespace LINGYUN.Abp.OpenIddict.Applications;
[Authorize(AbpOpenIddictPermissions.Applications.Default)]
public class OpenIddictApplicationAppService : OpenIddictApplicationServiceBase, IOpenIddictApplicationAppService
{
protected IOpenIddictApplicationRepository Repository { get; }
public OpenIddictApplicationAppService(
IOpenIddictApplicationRepository repository)
{
Repository = repository;
}
public async virtual Task<OpenIddictApplicationDto> GetAsync(Guid id)
{
var application = await Repository.GetAsync(id);
return application.ToDto(JsonSerializer);
}
public async virtual Task<PagedResultDto<OpenIddictApplicationDto>> GetListAsync(OpenIddictApplicationGetListInput input)
{
var totalCount = await Repository.GetCountAsync(input.Filter);
var entites = await Repository.GetListAsync(input.Sorting, input.SkipCount, input.MaxResultCount, input.Filter);
return new PagedResultDto<OpenIddictApplicationDto>(totalCount,
entites.Select(entity => entity.ToDto(JsonSerializer)).ToList());
}
[Authorize(AbpOpenIddictPermissions.Applications.Create)]
public async virtual Task<OpenIddictApplicationDto> CreateAsync(OpenIddictApplicationCreateDto input)
{
if (await Repository.FindByClientIdAsync(input.ClientId) != null)
{
throw new BusinessException(OpenIddictApplicationErrorCodes.Applications.ClientIdExisted)
.WithData(nameof(OpenIddictApplication.ClientId), input.ClientId);
}
var application = new OpenIddictApplication(GuidGenerator.Create());
application = input.ToEntity(application, JsonSerializer);
application = await Repository.InsertAsync(application);
await CurrentUnitOfWork.SaveChangesAsync();
return application.ToDto(JsonSerializer);
}
[Authorize(AbpOpenIddictPermissions.Applications.Update)]
public async virtual Task<OpenIddictApplicationDto> UpdateAsync(Guid id, OpenIddictApplicationUpdateDto input)
{
var application = await Repository.GetAsync(id);
if (!string.Equals(application.ClientId, input.ClientId) &&
await Repository.FindByClientIdAsync(input.ClientId) != null)
{
throw new BusinessException(OpenIddictApplicationErrorCodes.Applications.ClientIdExisted)
.WithData(nameof(OpenIddictApplicationCreateDto.ClientId), input.ClientId);
}
application = input.ToEntity(application, JsonSerializer);
application = await Repository.UpdateAsync(application);
await CurrentUnitOfWork.SaveChangesAsync();
return application.ToDto(JsonSerializer);
}
[Authorize(AbpOpenIddictPermissions.Applications.Delete)]
public async virtual Task DeleteAsync(Guid id)
{
await Repository.DeleteAsync(id);
await CurrentUnitOfWork.SaveChangesAsync();
}
}

162
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/Applications/OpenIddictApplicationExtensions.cs

@ -0,0 +1,162 @@
using OpenIddict.Abstractions;
using System;
using System.Collections.Generic;
using System.Linq;
using Volo.Abp;
using Volo.Abp.Json;
using Volo.Abp.OpenIddict.Applications;
namespace LINGYUN.Abp.OpenIddict.Applications;
internal static class OpenIddictApplicationExtensions
{
public static OpenIddictApplication ToEntity(this OpenIddictApplicationCreateOrUpdateDto dto, OpenIddictApplication entity, IJsonSerializer jsonSerializer)
{
Check.NotNull(dto, nameof(dto));
Check.NotNull(entity, nameof(entity));
entity.ClientId = dto.ClientId;
entity.ClientSecret = dto.ClientSecret;
entity.ConsentType = dto.ConsentType;
entity.DisplayName = dto.DisplayName;
entity.DisplayNames = jsonSerializer.Serialize(dto.DisplayNames);
entity.PostLogoutRedirectUris = jsonSerializer.Serialize(dto.PostLogoutRedirectUris);
entity.Properties = jsonSerializer.Serialize(dto.Properties);
entity.RedirectUris = jsonSerializer.Serialize(dto.RedirectUris);
entity.Type = dto.Type;
entity.ClientUri = dto.ClientUri;
entity.LogoUri = dto.LogoUri;
var requirements = new List<string>();
requirements.AddRange(
dto.Requirements.Select(requirement =>
{
if (!requirement.StartsWith(OpenIddictConstants.Requirements.Prefixes.Feature))
{
return OpenIddictConstants.Requirements.Prefixes.Feature + requirement;
}
return requirement;
}));
entity.Requirements = jsonSerializer.Serialize(requirements);
var permissions = new List<string>();
permissions.AddRange(
dto.Endpoints.Select(endpoint =>
{
if (!endpoint.StartsWith(OpenIddictConstants.Permissions.Prefixes.Endpoint))
{
return OpenIddictConstants.Permissions.Prefixes.Endpoint + endpoint;
}
return endpoint;
}));
permissions.AddRange(
dto.GrantTypes.Select(grantType =>
{
if (!grantType.StartsWith(OpenIddictConstants.Permissions.Prefixes.GrantType))
{
return OpenIddictConstants.Permissions.Prefixes.GrantType + grantType;
}
return grantType;
}));
permissions.AddRange(
dto.ResponseTypes.Select(responseType =>
{
if (!responseType.StartsWith(OpenIddictConstants.Permissions.Prefixes.ResponseType))
{
return OpenIddictConstants.Permissions.Prefixes.ResponseType + responseType;
}
return responseType;
}));
permissions.AddRange(
dto.Scopes.Select(scope =>
{
if (!scope.StartsWith(OpenIddictConstants.Permissions.Prefixes.Scope))
{
return OpenIddictConstants.Permissions.Prefixes.Scope + scope;
}
return scope;
}));
entity.Permissions = jsonSerializer.Serialize(permissions);
foreach (var extraProperty in dto.ExtraProperties)
{
entity.ExtraProperties.Remove(extraProperty.Key);
entity.ExtraProperties.Add(extraProperty.Key, extraProperty.Value);
}
return entity;
}
public static OpenIddictApplicationDto ToDto(this OpenIddictApplication entity, IJsonSerializer jsonSerializer)
{
if (entity == null)
{
return null;
}
var dto = new OpenIddictApplicationDto
{
Id = entity.Id,
ClientId = entity.ClientId,
ClientSecret = entity.ClientSecret,
ConsentType = entity.ConsentType,
DisplayName = entity.DisplayName,
CreationTime = entity.CreationTime,
CreatorId = entity.CreatorId,
LastModificationTime = entity.LastModificationTime,
LastModifierId = entity.LastModifierId,
DisplayNames = jsonSerializer.DeserializeToDictionary<string, string>(entity.DisplayNames),
PostLogoutRedirectUris = jsonSerializer.DeserializeToList<string>(entity.PostLogoutRedirectUris),
Properties = jsonSerializer.DeserializeToDictionary<string, string>(entity.Properties),
RedirectUris = jsonSerializer.DeserializeToList<string>(entity.RedirectUris),
Type = entity.Type,
ClientUri = entity.ClientUri,
LogoUri = entity.LogoUri
};
var requirements = jsonSerializer.DeserializeToList<string>(entity.Requirements);
dto.Requirements = requirements
.Where(HasPrefixKey(OpenIddictConstants.Requirements.Prefixes.Feature))
.Select(GetPrefixKey(OpenIddictConstants.Requirements.Prefixes.Feature))
.ToList();
var permissions = jsonSerializer.DeserializeToList<string>(entity.Permissions);
dto.Endpoints = permissions
.Where(HasPrefixKey(OpenIddictConstants.Permissions.Prefixes.Endpoint))
.Select(GetPrefixKey(OpenIddictConstants.Permissions.Prefixes.Endpoint))
.ToList();
dto.GrantTypes = permissions
.Where(HasPrefixKey(OpenIddictConstants.Permissions.Prefixes.GrantType))
.Select(GetPrefixKey(OpenIddictConstants.Permissions.Prefixes.GrantType))
.ToList();
dto.ResponseTypes = permissions
.Where(HasPrefixKey(OpenIddictConstants.Permissions.Prefixes.ResponseType))
.Select(GetPrefixKey(OpenIddictConstants.Permissions.Prefixes.ResponseType))
.ToList();
dto.Scopes = permissions
.Where(HasPrefixKey(OpenIddictConstants.Permissions.Prefixes.Scope))
.Select(GetPrefixKey(OpenIddictConstants.Permissions.Prefixes.Scope))
.ToList();
foreach (var extraProperty in entity.ExtraProperties)
{
dto.ExtraProperties.Add(extraProperty.Key, extraProperty.Value);
}
return dto;
}
private static Func<string, bool> HasPrefixKey(string prefix)
{
return p => p.StartsWith(prefix);
}
private static Func<string, string> GetPrefixKey(string prefix)
{
return p => p.RemovePreFix(prefix);
}
}

82
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/Authorizations/OpenIddictAuthorizationAppService.cs

@ -0,0 +1,82 @@
using LINGYUN.Abp.OpenIddict.Permissions;
using Microsoft.AspNetCore.Authorization;
using System;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.OpenIddict.Authorizations;
namespace LINGYUN.Abp.OpenIddict.Authorizations;
[Authorize(AbpOpenIddictPermissions.Authorizations.Default)]
public class OpenIddictAuthorizationAppService : OpenIddictApplicationServiceBase, IOpenIddictAuthorizationAppService
{
protected IRepository<OpenIddictAuthorization, Guid> Repository { get; }
public OpenIddictAuthorizationAppService(
IRepository<OpenIddictAuthorization, Guid> repository)
{
Repository = repository;
}
[Authorize(AbpOpenIddictPermissions.Authorizations.Delete)]
public async virtual Task DeleteAsync(Guid id)
{
await Repository.DeleteAsync(id);
await CurrentUnitOfWork.SaveChangesAsync();
}
public async virtual Task<OpenIddictAuthorizationDto> GetAsync(Guid id)
{
var authorization = await Repository.GetAsync(id);
return authorization.ToDto(JsonSerializer);
}
public async virtual Task<PagedResultDto<OpenIddictAuthorizationDto>> GetListAsync(OpenIddictAuthorizationGetListInput input)
{
var queryable = await Repository.GetQueryableAsync();
if (input.ClientId.HasValue)
{
queryable = queryable.Where(x => x.ApplicationId == input.ClientId);
}
if (input.BeginCreationTime.HasValue)
{
queryable = queryable.Where(x => x.CreationTime >= input.BeginCreationTime);
}
if (input.EndCreationTime.HasValue)
{
queryable = queryable.Where(x => x.CreationTime <= input.BeginCreationTime);
}
if (!input.Status.IsNullOrWhiteSpace())
{
queryable = queryable.Where(x => x.Status == input.Status);
}
if (!input.Type.IsNullOrWhiteSpace())
{
queryable = queryable.Where(x => x.Type == input.Type);
}
if (!input.Subject.IsNullOrWhiteSpace())
{
queryable = queryable.Where(x => x.Subject == input.Subject);
}
if (!input.Filter.IsNullOrWhiteSpace())
{
queryable = queryable.Where(x => x.Subject.Contains(input.Filter) ||
x.Status.Contains(input.Filter) || x.Type.Contains(input.Filter) ||
x.Scopes.Contains(input.Filter) || x.Properties.Contains(input.Filter));
}
queryable = queryable
.OrderBy(input.Sorting ?? $"{nameof(OpenIddictAuthorization.CreationTime)} DESC")
.PageBy(input.SkipCount, input.MaxResultCount);
var totalCount = await AsyncExecuter.CountAsync(queryable);
var entites = await AsyncExecuter.ToListAsync(queryable);
return new PagedResultDto<OpenIddictAuthorizationDto>(totalCount,
entites.Select(entity => entity.ToDto(JsonSerializer)).ToList());
}
}

38
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/Authorizations/OpenIddictAuthorizationExtensions.cs

@ -0,0 +1,38 @@
using Volo.Abp.Json;
using Volo.Abp.OpenIddict.Authorizations;
namespace LINGYUN.Abp.OpenIddict.Authorizations;
internal static class OpenIddictAuthorizationExtensions
{
public static OpenIddictAuthorizationDto ToDto(this OpenIddictAuthorization entity, IJsonSerializer jsonSerializer)
{
if (entity == null)
{
return null;
}
var dto = new OpenIddictAuthorizationDto
{
Id = entity.Id,
ApplicationId = entity.ApplicationId,
CreationDate = entity.CreationDate,
CreationTime = entity.CreationTime,
CreatorId = entity.CreatorId,
LastModificationTime = entity.LastModificationTime,
LastModifierId = entity.LastModifierId,
Properties = jsonSerializer.DeserializeToDictionary<string, string>(entity.Properties),
Scopes = jsonSerializer.DeserializeToList<string>(entity.Scopes),
Status = entity.Status,
Subject = entity.Subject,
Type = entity.Type
};
foreach (var extraProperty in entity.ExtraProperties)
{
dto.ExtraProperties.Add(extraProperty.Key, extraProperty.Value);
}
return dto;
}
}

22
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/OpenIddictApplicationServiceBase.cs

@ -0,0 +1,22 @@
using System.Threading;
using Volo.Abp.Application.Services;
using Volo.Abp.OpenIddict.Localization;
using Volo.Abp.Threading;
using Volo.Abp.Json;
namespace LINGYUN.Abp.OpenIddict;
public abstract class OpenIddictApplicationServiceBase : ApplicationService
{
protected IJsonSerializer JsonSerializer => LazyServiceProvider.LazyGetRequiredService<IJsonSerializer>();
protected ICancellationTokenProvider CancellationTokenProvider => LazyServiceProvider.LazyGetRequiredService<ICancellationTokenProvider>();
protected OpenIddictApplicationServiceBase()
{
LocalizationResource = typeof(AbpOpenIddictResource);
}
protected virtual CancellationToken GetCancellationToken()
{
return CancellationTokenProvider.FallbackToProvider();
}
}

85
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/Scopes/OpenIddictScopeAppService.cs

@ -0,0 +1,85 @@
using LINGYUN.Abp.OpenIddict.Permissions;
using Microsoft.AspNetCore.Authorization;
using System;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.OpenIddict.Scopes;
namespace LINGYUN.Abp.OpenIddict.Scopes;
[Authorize(AbpOpenIddictPermissions.Scopes.Default)]
public class OpenIddictScopeAppService : OpenIddictApplicationServiceBase, IOpenIddictScopeAppService
{
protected IOpenIddictScopeRepository Repository { get; }
public OpenIddictScopeAppService(IOpenIddictScopeRepository repository)
{
Repository = repository;
}
[Authorize(AbpOpenIddictPermissions.Scopes.Create)]
public async virtual Task<OpenIddictScopeDto> CreateAsync(OpenIddictScopeCreateDto input)
{
if (await Repository.FindByNameAsync(input.Name) != null)
{
throw new BusinessException(OpenIddictApplicationErrorCodes.Scopes.NameExisted)
.WithData(nameof(OpenIddictScope.Name), input.Name);
}
var scope = new OpenIddictScope(GuidGenerator.Create());
scope = input.ToEntity(scope, JsonSerializer);
scope = await Repository.InsertAsync(scope);
await CurrentUnitOfWork.SaveChangesAsync();
return scope.ToDto(JsonSerializer);
}
[Authorize(AbpOpenIddictPermissions.Scopes.Delete)]
public async virtual Task DeleteAsync(Guid id)
{
await Repository.DeleteAsync(id);
await CurrentUnitOfWork.SaveChangesAsync();
}
public async virtual Task<OpenIddictScopeDto> GetAsync(Guid id)
{
var scope = await Repository.GetAsync(id);
return scope.ToDto(JsonSerializer);
}
public async virtual Task<PagedResultDto<OpenIddictScopeDto>> GetListAsync(OpenIddictScopeGetListInput input)
{
var totalCount = await Repository.GetCountAsync(input.Filter);
var entites = await Repository.GetListAsync(input.Sorting, input.SkipCount, input.MaxResultCount, input.Filter);
return new PagedResultDto<OpenIddictScopeDto>(totalCount,
entites.Select(entity => entity.ToDto(JsonSerializer)).ToList());
}
[Authorize(AbpOpenIddictPermissions.Scopes.Update)]
public async virtual Task<OpenIddictScopeDto> UpdateAsync(Guid id, OpenIddictScopeUpdateDto input)
{
var scope = await Repository.GetAsync(id);
if (!string.Equals(scope.Name, input.Name) &&
await Repository.FindByNameAsync(input.Name) != null)
{
throw new BusinessException(OpenIddictApplicationErrorCodes.Scopes.NameExisted)
.WithData(nameof(OpenIddictScope.Name), input.Name);
}
scope = input.ToEntity(scope, JsonSerializer);
scope = await Repository.UpdateAsync(scope);
await CurrentUnitOfWork.SaveChangesAsync();
return scope.ToDto(JsonSerializer);
}
}

62
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/Scopes/OpenIddictScopeExtensions.cs

@ -0,0 +1,62 @@
using Volo.Abp;
using Volo.Abp.Json;
using Volo.Abp.OpenIddict.Scopes;
namespace LINGYUN.Abp.OpenIddict.Scopes;
internal static class OpenIddictScopeExtensions
{
public static OpenIddictScope ToEntity(this OpenIddictScopeCreateOrUpdateDto dto, OpenIddictScope entity, IJsonSerializer jsonSerializer)
{
Check.NotNull(dto, nameof(dto));
Check.NotNull(entity, nameof(entity));
entity.Description = dto.Description;
entity.Descriptions = jsonSerializer.Serialize(dto.Descriptions);
entity.DisplayName = dto.DisplayName;
entity.DisplayNames = jsonSerializer.Serialize(dto.DisplayNames);
entity.Name = dto.Name;
entity.Properties = jsonSerializer.Serialize(dto.Properties);
entity.Resources = jsonSerializer.Serialize(dto.Resources);
foreach (var extraProperty in dto.ExtraProperties)
{
entity.ExtraProperties.Remove(extraProperty.Key);
entity.ExtraProperties.Add(extraProperty.Key, extraProperty.Value);
}
return entity;
}
public static OpenIddictScopeDto ToDto(this OpenIddictScope entity, IJsonSerializer jsonSerializer)
{
if (entity == null)
{
return null;
}
var dto = new OpenIddictScopeDto
{
Id = entity.Id,
CreationTime = entity.CreationTime,
CreatorId = entity.CreatorId,
LastModificationTime = entity.LastModificationTime,
LastModifierId = entity.LastModifierId,
Description = entity.Description,
Descriptions = jsonSerializer.DeserializeToDictionary<string, string>(entity.Descriptions),
DisplayName = entity.DisplayName,
DisplayNames = jsonSerializer.DeserializeToDictionary<string, string>(entity.DisplayNames),
Name = entity.Name,
Properties = jsonSerializer.DeserializeToDictionary<string, string>(entity.Properties),
Resources = jsonSerializer.DeserializeToList<string>(entity.Resources)
};
foreach (var extraProperty in entity.ExtraProperties)
{
dto.ExtraProperties.Add(extraProperty.Key, extraProperty.Value);
}
return dto;
}
}

94
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/Tokens/OpenIddictTokenAppService.cs

@ -0,0 +1,94 @@
using LINGYUN.Abp.OpenIddict.Permissions;
using Microsoft.AspNetCore.Authorization;
using System;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.OpenIddict.Tokens;
namespace LINGYUN.Abp.OpenIddict.Tokens;
[Authorize(AbpOpenIddictPermissions.Tokens.Default)]
public class OpenIddictTokenAppService : OpenIddictApplicationServiceBase, IOpenIddictTokenAppService
{
protected IRepository<OpenIddictToken, Guid> Repository { get; }
public OpenIddictTokenAppService(IRepository<OpenIddictToken, Guid> repository)
{
Repository = repository;
}
[Authorize(AbpOpenIddictPermissions.Tokens.Delete)]
public async virtual Task DeleteAsync(Guid id)
{
await Repository.DeleteAsync(id);
await CurrentUnitOfWork.SaveChangesAsync();
}
public async virtual Task<OpenIddictTokenDto> GetAsync(Guid id)
{
var scope = await Repository.GetAsync(id);
return scope.ToDto();
}
public async virtual Task<PagedResultDto<OpenIddictTokenDto>> GetListAsync(OpenIddictTokenGetListInput input)
{
var queryable = await Repository.GetQueryableAsync();
if (input.ClientId.HasValue)
{
queryable = queryable.Where(x => x.ApplicationId == input.ClientId);
}
if (input.BeginCreationTime.HasValue)
{
queryable = queryable.Where(x => x.CreationTime >= input.BeginCreationTime);
}
if (input.EndCreationTime.HasValue)
{
queryable = queryable.Where(x => x.CreationTime <= input.BeginCreationTime);
}
if (input.BeginExpirationDate.HasValue)
{
queryable = queryable.Where(x => x.ExpirationDate >= input.BeginCreationTime);
}
if (input.EndExpirationDate.HasValue)
{
queryable = queryable.Where(x => x.ExpirationDate <= input.BeginCreationTime);
}
if (!input.Status.IsNullOrWhiteSpace())
{
queryable = queryable.Where(x => x.Status == input.Status);
}
if (!input.Type.IsNullOrWhiteSpace())
{
queryable = queryable.Where(x => x.Type == input.Type);
}
if (!input.Subject.IsNullOrWhiteSpace())
{
queryable = queryable.Where(x => x.Subject == input.Subject);
}
if (!input.ReferenceId.IsNullOrWhiteSpace())
{
queryable = queryable.Where(x => x.ReferenceId == input.ReferenceId);
}
if (!input.Filter.IsNullOrWhiteSpace())
{
queryable = queryable.Where(x => x.Subject.Contains(input.Filter) ||
x.Status.Contains(input.Filter) || x.Type.Contains(input.Filter) ||
x.Payload.Contains(input.Filter) || x.Properties.Contains(input.Filter) ||
x.ReferenceId.Contains(input.ReferenceId));
}
queryable = queryable
.OrderBy(input.Sorting ?? $"{nameof(OpenIddictToken.CreationTime)} DESC")
.PageBy(input.SkipCount, input.MaxResultCount);
var totalCount = await AsyncExecuter.CountAsync(queryable);
var entites = await AsyncExecuter.ToListAsync(queryable);
return new PagedResultDto<OpenIddictTokenDto>(totalCount,
entites.Select(entity => entity.ToDto()).ToList());
}
}

68
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/LINGYUN/Abp/OpenIddict/Tokens/OpenIddictTokenExtensions.cs

@ -0,0 +1,68 @@
using Volo.Abp;
using Volo.Abp.OpenIddict.Tokens;
namespace LINGYUN.Abp.OpenIddict.Tokens;
internal static class OpenIddictTokenExtensions
{
public static OpenIddictToken ToEntity(this OpenIddictTokenDto dto, OpenIddictToken entity)
{
Check.NotNull(dto, nameof(dto));
Check.NotNull(entity, nameof(entity));
entity.ApplicationId = dto.ApplicationId;
entity.AuthorizationId = dto.AuthorizationId;
entity.CreationDate = dto.CreationDate;
entity.ExpirationDate = dto.ExpirationDate;
entity.Payload = dto.Payload;
entity.Properties = dto.Properties;
entity.RedemptionDate = dto.RedemptionDate;
entity.ReferenceId = dto.ReferenceId;
entity.Status = dto.Status;
entity.Subject = dto.Subject;
entity.Type = dto.Type;
foreach (var extraProperty in dto.ExtraProperties)
{
entity.ExtraProperties.Remove(extraProperty.Key);
entity.ExtraProperties.Add(extraProperty.Key, extraProperty.Value);
}
return entity;
}
public static OpenIddictTokenDto ToDto(this OpenIddictToken entity)
{
if (entity == null)
{
return null;
}
var model = new OpenIddictTokenDto
{
Id = entity.Id,
ApplicationId = entity.ApplicationId,
AuthorizationId = entity.AuthorizationId,
CreationDate = entity.CreationDate,
CreationTime = entity.CreationTime,
CreatorId = entity.CreatorId,
LastModificationTime = entity.LastModificationTime,
LastModifierId = entity.LastModifierId,
ExpirationDate = entity.ExpirationDate,
Payload = entity.Payload,
Properties = entity.Properties,
RedemptionDate = entity.RedemptionDate,
ReferenceId = entity.ReferenceId,
Status = entity.Status,
Subject = entity.Subject,
Type = entity.Type
};
foreach (var extraProperty in entity.ExtraProperties)
{
model.ExtraProperties.Add(extraProperty.Key, extraProperty.Value);
}
return model;
}
}

26
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application/Volo/Abp/Json/IJsonSerializerExtensions.cs

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
namespace Volo.Abp.Json;
internal static class IJsonSerializerExtensions
{
public static List<TResult> DeserializeToList<TResult>(this IJsonSerializer serializer, string source)
{
if (source.IsNullOrWhiteSpace())
{
return new List<TResult>();
}
return serializer.Deserialize<List<TResult>>(source);
}
public static Dictionary<TKey, TValue> DeserializeToDictionary<TKey, TValue>(this IJsonSerializer serializer, string source)
{
if (source.IsNullOrWhiteSpace())
{
return new Dictionary<TKey, TValue>();
}
return serializer.Deserialize<Dictionary<TKey, TValue>>(source);
}
}

3
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Dapr.Client/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Dapr.Client/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

16
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Dapr.Client/LINGYUN.Abp.OpenIddict.Dapr.Client.csproj

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\common.props" />
<Import Project="..\..\..\configureawait.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\dapr\LINGYUN.Abp.Dapr.Client\LINGYUN.Abp.Dapr.Client.csproj" />
<ProjectReference Include="..\LINGYUN.Abp.OpenIddict.Application.Contracts\LINGYUN.Abp.OpenIddict.Application.Contracts.csproj" />
</ItemGroup>
</Project>

18
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Dapr.Client/LINGYUN/Abp/OpenIddict/AbpOpenIddictDaprClientModule.cs

@ -0,0 +1,18 @@
using Microsoft.Extensions.DependencyInjection;
using LINGYUN.Abp.Dapr.Client;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.OpenIddict;
[DependsOn(
typeof(AbpOpenIddictApplicationContractsModule),
typeof(AbpDaprClientModule))]
public class AbpOpenIddictDaprClientModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddStaticDaprClientProxies(
typeof(AbpOpenIddictApplicationContractsModule).Assembly,
OpenIddictRemoteServiceConsts.RemoteServiceName);
}
}

3
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi.Client/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi.Client/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

19
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi.Client/LINGYUN.Abp.OpenIddict.HttpApi.Client.csproj

@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\common.props" />
<Import Project="..\..\..\configureawait.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client" Version="$(VoloAbpPackageVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LINGYUN.Abp.OpenIddict.Application.Contracts\LINGYUN.Abp.OpenIddict.Application.Contracts.csproj" />
</ItemGroup>
</Project>

18
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi.Client/LINGYUN/Abp/OpenIddict/AbpOpenIddictHttpApiClientModule.cs

@ -0,0 +1,18 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.OpenIddict;
[DependsOn(
typeof(AbpOpenIddictApplicationContractsModule),
typeof(AbpHttpClientModule))]
public class AbpOpenIddictHttpApiClientModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddStaticHttpClientProxies(
typeof(AbpOpenIddictApplicationContractsModule).Assembly,
OpenIddictRemoteServiceConsts.RemoteServiceName);
}
}

3
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

19
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi/LINGYUN.Abp.OpenIddict.HttpApi.csproj

@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\common.props" />
<Import Project="..\..\..\configureawait.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="$(VoloAbpPackageVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LINGYUN.Abp.OpenIddict.Application.Contracts\LINGYUN.Abp.OpenIddict.Application.Contracts.csproj" />
</ItemGroup>
</Project>

38
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi/LINGYUN/Abp/OpenIddict/AbpOpenIddictHttpApiModule.cs

@ -0,0 +1,38 @@
using Localization.Resources.AbpUi;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.OpenIddict.Localization;
namespace LINGYUN.Abp.OpenIddict;
[DependsOn(
typeof(AbpOpenIddictApplicationContractsModule),
typeof(AbpAspNetCoreMvcModule))]
public class AbpOpenIddictHttpApiModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options =>
{
options.AddAssemblyResource(typeof(AbpOpenIddictResource), typeof(AbpOpenIddictApplicationContractsModule).Assembly);
});
PreConfigure<IMvcBuilder>(mvcBuilder =>
{
mvcBuilder.AddApplicationPartIfNotExists(typeof(AbpOpenIddictHttpApiModule).Assembly);
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<AbpOpenIddictResource>()
.AddBaseTypes(typeof(AbpUiResource));
});
}
}

60
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi/LINGYUN/Abp/OpenIddict/Applications/OpenIddictApplicationController.cs

@ -0,0 +1,60 @@
using LINGYUN.Abp.OpenIddict.Permissions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.OpenIddict.Applications;
[Controller]
[Authorize(AbpOpenIddictPermissions.Applications.Default)]
[RemoteService(Name = OpenIddictRemoteServiceConsts.RemoteServiceName)]
[Area(OpenIddictRemoteServiceConsts.ModuleName)]
[Route("api/openiddict/applications")]
public class OpenIddictApplicationController : OpenIddictControllerBase, IOpenIddictApplicationAppService
{
protected IOpenIddictApplicationAppService Service { get; }
public OpenIddictApplicationController(IOpenIddictApplicationAppService service)
{
Service = service;
}
[HttpGet]
[Route("{id}")]
public virtual Task<OpenIddictApplicationDto> GetAsync(Guid id)
{
return Service.GetAsync(id);
}
[HttpGet]
public virtual Task<PagedResultDto<OpenIddictApplicationDto>> GetListAsync(OpenIddictApplicationGetListInput input)
{
return Service.GetListAsync(input);
}
[HttpPost]
[Authorize(AbpOpenIddictPermissions.Applications.Create)]
public virtual Task<OpenIddictApplicationDto> CreateAsync(OpenIddictApplicationCreateDto input)
{
return Service.CreateAsync(input);
}
[HttpPut]
[Route("{id}")]
[Authorize(AbpOpenIddictPermissions.Applications.Update)]
public virtual Task<OpenIddictApplicationDto> UpdateAsync(Guid id, OpenIddictApplicationUpdateDto input)
{
return Service.UpdateAsync(id, input);
}
[HttpDelete]
[Route("{id}")]
[Authorize(AbpOpenIddictPermissions.Applications.Delete)]
public virtual Task DeleteAsync(Guid id)
{
return Service.DeleteAsync(id);
}
}

45
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.HttpApi/LINGYUN/Abp/OpenIddict/Authorizations/OpenIddictAuthorizationController.cs

@ -0,0 +1,45 @@
using LINGYUN.Abp.OpenIddict.Permissions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.OpenIddict.Authorizations;
[Controller]
[Authorize(AbpOpenIddictPermissions.Authorizations.Default)]
[RemoteService(Name = OpenIddictRemoteServiceConsts.RemoteServiceName)]
[Area(OpenIddictRemoteServiceConsts.ModuleName)]
[Route("api/openiddict/authorizations")]
public class OpenIddictAuthorizationController : OpenIddictControllerBase, IOpenIddictAuthorizationAppService
{
protected IOpenIddictAuthorizationAppService Service { get; }
public OpenIddictAuthorizationController(IOpenIddictAuthorizationAppService service)
{
Service = service;
}
[HttpDelete]
[Route("{id}")]
[Authorize(AbpOpenIddictPermissions.Authorizations.Delete)]
public virtual Task DeleteAsync(Guid id)
{
return Service.DeleteAsync(id);
}
[HttpGet]
[Route("{id}")]
public virtual Task<OpenIddictAuthorizationDto> GetAsync(Guid id)
{
return Service.GetAsync(id);
}
[HttpGet]
public virtual Task<PagedResultDto<OpenIddictAuthorizationDto>> GetListAsync(OpenIddictAuthorizationGetListInput input)
{
return Service.GetListAsync(input);
}
}

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

Loading…
Cancel
Save