Browse Source

Change the reference to the Account module.

pull/60/head
maliming 5 years ago
parent
commit
edc2b5c987
No known key found for this signature in database GPG Key ID: 96224957E51C89E
  1. 2
      apps/angular/angular.json
  2. 18
      apps/angular/package.json
  3. 4
      apps/angular/src/app/app.module.ts
  4. 2
      apps/angular/src/environments/environment.prod.ts
  5. 2
      apps/angular/src/environments/environment.ts
  6. 2051
      apps/angular/yarn.lock
  7. 2
      apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbp.AuthServer.csproj
  8. 12
      apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs
  9. 6
      apps/auth-server/src/EShopOnAbp.AuthServer/appsettings.json
  10. 1
      apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj
  11. 2
      apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs
  12. 2
      gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json
  13. 2
      gateways/web/src/EShopOnAbp.WebGateway/appsettings.json
  14. 2
      services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/AdministrationServiceHttpApiHostModule.cs
  15. 1
      services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj
  16. 1
      services/identity/src/EShopOnAbp.IdentityService.Application.Contracts/EShopOnAbp.IdentityService.Application.Contracts.csproj
  17. 4
      services/identity/src/EShopOnAbp.IdentityService.Application.Contracts/IdentityServiceApplicationContractsModule.cs
  18. 1
      services/identity/src/EShopOnAbp.IdentityService.Application/EShopOnAbp.IdentityService.Application.csproj
  19. 2
      services/identity/src/EShopOnAbp.IdentityService.Application/IdentityServiceApplicationModule.cs
  20. 1
      services/identity/src/EShopOnAbp.IdentityService.HttpApi.Client/EShopOnAbp.IdentityService.HttpApi.Client.csproj
  21. 7
      services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/DbMigrations/IdentityServerDataSeeder.cs
  22. 3
      services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json
  23. 1
      services/identity/src/EShopOnAbp.IdentityService.HttpApi/EShopOnAbp.IdentityService.HttpApi.csproj
  24. 4
      services/identity/src/EShopOnAbp.IdentityService.HttpApi/IdentityServiceHttpApiModule.cs
  25. 1
      services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj

2
apps/angular/angular.json

@ -51,7 +51,7 @@
"bundleName": "ngx-datatable-material"
},
{
"input": "node_modules/@abp/ng.theme.shared/styles/bootstrap-rtl.min.css",
"input": "node_modules/bootstrap/dist/css/bootstrap.rtl.min.css",
"inject": false,
"bundleName": "bootstrap-rtl.min"
},

18
apps/angular/package.json

@ -12,15 +12,15 @@
},
"private": true,
"dependencies": {
"@abp/ng.account": "4.4.4",
"@abp/ng.components": "4.4.4",
"@abp/ng.core": "4.4.4",
"@abp/ng.identity": "4.4.4",
"@abp/ng.setting-management": "4.4.4",
"@abp/ng.tenant-management": "4.4.4",
"@abp/ng.theme.basic": "4.4.4",
"@abp/ng.account": "5.0.1",
"@abp/ng.components": "5.0.1",
"@abp/ng.core": "5.0.1",
"@abp/ng.identity": "5.0.1",
"@abp/ng.setting-management": "5.0.1",
"@abp/ng.tenant-management": "5.0.1",
"@abp/ng.theme.basic": "5.0.1",
"@abp/ng.theme.lepton-x": "^1.0.0-alpha.2",
"@abp/ng.theme.shared": "4.4.4",
"@abp/ng.theme.shared": "5.0.1",
"@angular/animations": "~12.2.8",
"@angular/common": "~12.2.8",
"@angular/compiler": "~12.2.8",
@ -35,7 +35,7 @@
"zone.js": "~0.11.4"
},
"devDependencies": {
"@abp/ng.schematics": "4.4.4",
"@abp/ng.schematics": "5.0.1",
"@angular-devkit/build-angular": "~12.2.8",
"@angular/cli": "~12.2.8",
"@angular/compiler-cli": "~12.2.8",

4
apps/angular/src/app/app.module.ts

@ -12,7 +12,6 @@ import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { CatalogConfigModule } from '@eshoponabp/catalog/config';
import { NgxsModule } from '@ngxs/store';
import { environment } from '../environments/environment';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
@ -35,8 +34,7 @@ import { APP_ROUTE_PROVIDER } from './route.provider';
ThemeLeptonXModule.forRoot(),
SideMenuLayoutModule.forRoot(),
AccountLayoutModule.forRoot(),
CatalogConfigModule.forRoot(),
NgxsModule.forRoot(),
CatalogConfigModule.forRoot()
],
declarations: [AppComponent],
providers: [APP_ROUTE_PROVIDER],

2
apps/angular/src/environments/environment.prod.ts

@ -14,7 +14,7 @@ export const environment = {
redirectUri: baseUrl,
clientId: 'Web',
responseType: 'code',
scope: 'offline_access openid profile email phone IdentityService AdministrationService',
scope: 'offline_access openid profile email phone AuthServer IdentityService AdministrationService',
},
apis: {
default: {

2
apps/angular/src/environments/environment.ts

@ -13,7 +13,7 @@ export const environment = {
redirectUri: baseUrl,
clientId: 'Web',
//responseType: 'code',
scope: 'offline_access openid profile email phone IdentityService AdministrationService',
scope: 'offline_access openid profile email phone AuthServer IdentityService AdministrationService',
//requireHttps: true,
},
apis: {

2051
apps/angular/yarn.lock

File diff suppressed because it is too large

2
apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbp.AuthServer.csproj

@ -16,7 +16,9 @@
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.Account.HttpApi" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.Account.Application" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="5.0.0-rc.1" />
</ItemGroup>
<ItemGroup>

12
apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs

@ -19,6 +19,7 @@ using Microsoft.Extensions.Configuration;
using Volo.Abp;
using Volo.Abp.Account;
using Volo.Abp.Account.Web;
using Volo.Abp.AspNetCore.Authentication.JwtBearer;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.Auditing;
@ -37,10 +38,12 @@ namespace EShopOnAbp.AuthServer
{
[DependsOn(
typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
typeof(AbpEventBusRabbitMqModule),
typeof(AbpBackgroundJobsRabbitMqModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule),
typeof(AbpAccountWebIdentityServerModule),
typeof(AbpAccountHttpApiModule),
typeof(AbpAccountApplicationModule),
typeof(EShopOnAbpSharedHostingAspNetCoreModule),
typeof(EShopOnAbpSharedLocalizationModule),
@ -89,6 +92,14 @@ namespace EShopOnAbp.AuthServer
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
context.Services.AddAuthentication()
.AddJwtBearer(options =>
{
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]);
options.Audience = "AuthServer";
});
Configure<IdentityServerOptions>(options =>
{
options.IssuerUri = configuration["App:SelfUrl"];
@ -199,6 +210,7 @@ namespace EShopOnAbp.AuthServer
app.UseCors();
// app.UseHttpMetrics();
app.UseAuthentication();
app.UseJwtTokenMiddleware();
app.UseAbpSerilogEnrichers();
app.UseUnitOfWork();
app.UseIdentityServer();

6
apps/auth-server/src/EShopOnAbp.AuthServer/appsettings.json

@ -1,7 +1,7 @@
{
"App": {
"SelfUrl": "https://localhost:44330",
"CorsOrigins": "https://*.EShopOnAbp.com,http://localhost:4200,https://localhost:44307,https://localhost:44372,https://localhost:44353,https://localhost:44356",
"CorsOrigins": "https://*.EShopOnAbp.com,http://localhost:4200,https://localhost:44307,https://localhost:44372,https://localhost:44353,https://localhost:44356,http://localhost:4200",
"RedirectAllowedUrls": "http://localhost:4200,https://localhost:44307"
},
"Logging": {
@ -11,6 +11,10 @@
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AuthServer": {
"Authority": "https://localhost:44330",
"RequireHttpsMetadata": "true"
},
"AllowedHosts": "*",
"ConnectionStrings": {
"IdentityService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Identity;Pooling=false;",

1
apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj

@ -17,7 +17,6 @@
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.OpenIdConnect" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.Client" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.Account.HttpApi" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.Account.HttpApi.Client" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.AspNetCore.SignalR" Version="5.0.0-rc.1" />
</ItemGroup>

2
apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs

@ -43,7 +43,6 @@ namespace EShopOnAbp.PublicWeb
typeof(AbpAspNetCoreAuthenticationOpenIdConnectModule),
typeof(AbpHttpClientIdentityModelWebModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule),
typeof(AbpAccountHttpApiModule),
typeof(AbpAccountHttpApiClientModule),
typeof(EShopOnAbpSharedHostingAspNetCoreModule),
typeof(EShopOnAbpSharedLocalizationModule),
@ -123,6 +122,7 @@ namespace EShopOnAbp.PublicWeb
options.Scope.Add("role");
options.Scope.Add("email");
options.Scope.Add("phone");
options.Scope.Add("AuthServer");
options.Scope.Add("AdministrationService");
options.Scope.Add("BasketService");
options.Scope.Add("CatalogService");

2
gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json

@ -25,7 +25,7 @@
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 44351
"Port": 44330
}
],
"UpstreamPathTemplate": "/api/account/{everything}",

2
gateways/web/src/EShopOnAbp.WebGateway/appsettings.json

@ -38,7 +38,7 @@
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 44351
"Port": 44330
}
],
"UpstreamPathTemplate": "/api/account/{everything}",

2
services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/AdministrationServiceHttpApiHostModule.cs

@ -10,7 +10,6 @@ using Microsoft.AspNetCore.Cors;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Volo.Abp;
using Volo.Abp.Account;
using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy;
using Volo.Abp.Http.Client.IdentityModel.Web;
using Volo.Abp.Identity;
@ -24,7 +23,6 @@ namespace EShopOnAbp.AdministrationService
typeof(AdministrationServiceApplicationModule),
typeof(AdministrationServiceEntityFrameworkCoreModule),
typeof(EShopOnAbpSharedHostingMicroservicesModule),
typeof(AbpAccountApplicationContractsModule),
typeof(AbpHttpClientIdentityModelWebModule),
typeof(AbpAspNetCoreMvcUiMultiTenancyModule),
typeof(AbpIdentityHttpApiClientModule)

1
services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj

@ -16,7 +16,6 @@
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel.Web" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.Identity.HttpApi.Client" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="5.0.0-rc.1" />
</ItemGroup>
<ItemGroup>

1
services/identity/src/EShopOnAbp.IdentityService.Application.Contracts/EShopOnAbp.IdentityService.Application.Contracts.csproj

@ -11,7 +11,6 @@
<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="5.0.0-rc.1" />
</ItemGroup>
</Project>

4
services/identity/src/EShopOnAbp.IdentityService.Application.Contracts/IdentityServiceApplicationContractsModule.cs

@ -1,12 +1,10 @@
using Volo.Abp.Account;
using Volo.Abp.Identity;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
namespace EShopOnAbp.IdentityService
{
[DependsOn(
typeof(IdentityServiceDomainSharedModule),
typeof(AbpAccountApplicationContractsModule),
typeof(AbpIdentityApplicationContractsModule)
)]
public class IdentityServiceApplicationContractsModule : AbpModule

1
services/identity/src/EShopOnAbp.IdentityService.Application/EShopOnAbp.IdentityService.Application.csproj

@ -12,7 +12,6 @@
<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.Application" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.Account.Application" Version="5.0.0-rc.1" />
</ItemGroup>
</Project>

2
services/identity/src/EShopOnAbp.IdentityService.Application/IdentityServiceApplicationModule.cs

@ -1,5 +1,4 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Account;
using Volo.Abp.AutoMapper;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
@ -9,7 +8,6 @@ namespace EShopOnAbp.IdentityService
[DependsOn(
typeof(IdentityServiceDomainModule),
typeof(IdentityServiceApplicationContractsModule),
typeof(AbpAccountApplicationModule),
typeof(AbpIdentityApplicationModule)
)]
public class IdentityServiceApplicationModule : AbpModule

1
services/identity/src/EShopOnAbp.IdentityService.HttpApi.Client/EShopOnAbp.IdentityService.HttpApi.Client.csproj

@ -11,7 +11,6 @@
<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.HttpApi.Client" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.Account.HttpApi.Client" Version="5.0.0-rc.1" />
</ItemGroup>
</Project>

7
services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/DbMigrations/IdentityServerDataSeeder.cs

@ -83,6 +83,7 @@ namespace EShopOnAbp.IdentityService.DbMigrations
"role"
};
await CreateApiResourceAsync("AuthServer", commonApiUserClaims);
await CreateApiResourceAsync("IdentityService", commonApiUserClaims);
await CreateApiResourceAsync("AdministrationService", commonApiUserClaims);
await CreateApiResourceAsync("CatalogService", commonApiUserClaims);
@ -93,6 +94,7 @@ namespace EShopOnAbp.IdentityService.DbMigrations
private async Task CreateApiScopesAsync()
{
await CreateApiScopeAsync("AuthServer");
await CreateApiScopeAsync("IdentityService");
await CreateApiScopeAsync("AdministrationService");
await CreateApiScopeAsync("CatalogService");
@ -103,6 +105,9 @@ namespace EShopOnAbp.IdentityService.DbMigrations
private async Task CreateSwaggerClientsAsync()
{
await CreateSwaggerClientAsync("AuthServer",
new[] { "AuthServer"});
await CreateSwaggerClientAsync("IdentityService",
new[] { "IdentityService"});
@ -216,6 +221,7 @@ namespace EShopOnAbp.IdentityService.DbMigrations
name: "PublicWeb",
scopes: commonScopes.Union(new[]
{
"AuthServer",
"AdministrationService",
"CatalogService",
"BasketService",
@ -237,6 +243,7 @@ namespace EShopOnAbp.IdentityService.DbMigrations
name: "Web",
scopes: commonScopes.Union(new[]
{
"AuthServer",
"IdentityService",
"AdministrationService"
}),

3
services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json

@ -54,6 +54,9 @@
"PublicWebGateway": {
"RootUrl": "https://localhost:44373"
},
"AuthServer": {
"RootUrl": "https://localhost:44330"
},
"IdentityService": {
"RootUrl": "https://localhost:44351"
},

1
services/identity/src/EShopOnAbp.IdentityService.HttpApi/EShopOnAbp.IdentityService.HttpApi.csproj

@ -11,7 +11,6 @@
<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.HttpApi" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.Account.HttpApi" Version="5.0.0-rc.1" />
</ItemGroup>
</Project>

4
services/identity/src/EShopOnAbp.IdentityService.HttpApi/IdentityServiceHttpApiModule.cs

@ -1,12 +1,10 @@
using Volo.Abp.Account;
using Volo.Abp.Identity;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
namespace EShopOnAbp.IdentityService
{
[DependsOn(
typeof(IdentityServiceApplicationContractsModule),
typeof(AbpAccountHttpApiModule),
typeof(AbpIdentityHttpApiModule)
)]
public class IdentityServiceHttpApiModule : AbpModule

1
services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj

@ -12,7 +12,6 @@
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel.Web" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.Identity.HttpApi.Client" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="5.0.0-rc.1" />
</ItemGroup>
<ItemGroup>

Loading…
Cancel
Save