Skip to content

Commit 0324ec9

Browse files
committed
auth server running
1 parent 523f0d5 commit 0324ec9

File tree

22 files changed

+3558
-1174
lines changed

22 files changed

+3558
-1174
lines changed

apps/Tasky.AuthServer/Logs/logs.txt

Lines changed: 1097 additions & 0 deletions
Large diffs are not rendered by default.

apps/Tasky.AuthServer/Pages/Index.cshtml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
@using Volo.Abp.AspNetCore.Mvc.UI.Theming
77
@using Volo.Abp.Ui.Branding
88
@model IndexModel
9-
@inject IHtmlLocalizer L
109
@inject ICurrentUser CurrentUser
1110
@inject IBrandingProvider BrandingProvider
1211
@inject ITheme Theme
@@ -47,17 +46,17 @@
4746
@if (CurrentUser.IsAuthenticated)
4847
{
4948
<span class="fs-16">
50-
@L["Welcome"] <span class="fw-7">@CurrentUser.UserName</span>
49+
Welcome <span class="fw-7">@CurrentUser.UserName</span>
5150
</span>
5251
<span class="fs-14 d-block text-dark-800 opacity-75 mb-1">@CurrentUser.Email</span>
5352
<div class="d-grid gap-2">
54-
<a abp-button="Outline_Primary" asp-controller="Manage" asp-action="Index" asp-area="Account">@L["MyAccount"]</a>
55-
<a abp-button="Primary" asp-controller="Logout" asp-action="Index" asp-area="Account">@L["Logout"]</a>
53+
<a abp-button="Outline_Primary" asp-controller="Manage" asp-action="Index" asp-area="Account">MyAccount</a>
54+
<a abp-button="Primary" asp-controller="Logout" asp-action="Index" asp-area="Account">Logout</a>
5655
</div>
5756
}
5857
else
5958
{
60-
<a abp-button="Primary" asp-controller="Login" asp-action="Index" asp-area="Account">@L["Login"]</a>
59+
<a abp-button="Primary" asp-controller="Login" asp-action="Index" asp-area="Account">Login</a>
6160
}
6261
</div>
6362

@@ -98,7 +97,7 @@
9897
<h4>@application.DisplayName</h4>
9998
<span class="text-muted">@application.ClientUri</span>
10099
<div class="mt-1">
101-
<a abp-button="Outline_Secondary" href="@application.ClientUri">@L["Visit"]</a>
100+
<a abp-button="Outline_Secondary" href="@application.ClientUri">Visit</a>
102101
</div>
103102
</abp-card-body>
104103
</abp-card>

apps/Tasky.AuthServer/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"Tasky.AuthServer": {
1919
"commandName": "Project",
2020
"launchBrowser": true,
21-
"applicationUrl": "https://localhost:7600;http://localhost:7600",
21+
"applicationUrl": "https://localhost:7600;http://localhost:7601",
2222
"environmentVariables": {
2323
"ASPNETCORE_ENVIRONMENT": "Development"
2424
}

apps/Tasky.AuthServer/appsettings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"RedirectAllowedUrls": "http://localhost:4200,http://localhost:3000,https://localhost:7001"
77
},
88
"ConnectionStrings": {
9-
"SaaS": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=SaasService;Pooling=false;",
9+
"SaaSService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=SaasService;Pooling=false;",
1010
"IdentityService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=IdentityService;Pooling=false;",
11-
"Administration": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=AdministrationService;Pooling=false;"
11+
"AdministrationService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=AdministrationService;Pooling=false;"
1212
},
1313
"Redis": {
1414
"Configuration": "127.0.0.1"

services/administration/test/Tasky.AdministrationService.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ private async Task TestWithHttpClientAndIdentityModelAuthenticationServiceAsync(
9393
}
9494

9595
/* Shows how to use HttpClient to perform a request to the HTTP API.
96-
* It obtains access token using IdentityServer's API. See its documentation:
97-
* https://identityserver4.readthedocs.io/en/latest/quickstarts/2_resource_owner_passwords.html
96+
* It obtains access token using OpenIddict's API. See its documentation:
97+
* https://OpenIddict4.readthedocs.io/en/latest/quickstarts/2_resource_owner_passwords.html
9898
*/
9999
private async Task TestAllManuallyAsync()
100100
{

services/identity/src/Tasky.IdentityService.Domain.Shared/IdentityServiceDomainSharedModule.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
using Volo.Abp.Validation.Localization;
77
using Volo.Abp.VirtualFileSystem;
88
using Volo.Abp.Identity;
9-
using Volo.Abp.IdentityServer;
9+
using Volo.Abp.OpenIddict;
1010

1111
namespace Tasky.IdentityService;
1212

1313
[DependsOn(
1414
typeof(AbpValidationModule)
1515
)]
1616
[DependsOn(typeof(AbpIdentityDomainSharedModule))]
17-
[DependsOn(typeof(AbpIdentityServerDomainSharedModule))]
17+
[DependsOn(typeof(AbpOpenIddictDomainSharedModule))]
1818
public class IdentityServiceDomainSharedModule : AbpModule
1919
{
2020
public override void ConfigureServices(ServiceConfigurationContext context)

services/identity/src/Tasky.IdentityService.Domain.Shared/Tasky.IdentityService.Domain.Shared.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<ItemGroup>
1212
<PackageReference Include="Volo.Abp.Identity.Domain.Shared" Version="6.0.2" />
13-
<PackageReference Include="Volo.Abp.IdentityServer.Domain.Shared" Version="6.0.2" />
13+
<PackageReference Include="Volo.Abp.OpenIddict.Domain.Shared" Version="6.0.2" />
1414
<PackageReference Include="Volo.Abp.Validation" Version="6.0.2" />
1515
</ItemGroup>
1616

services/identity/src/Tasky.IdentityService.Domain/IdentityServiceDomainModule.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
using Volo.Abp.Modularity;
33
using Volo.Abp.Identity;
44
using Volo.Abp.PermissionManagement;
5-
using Volo.Abp.IdentityServer;
5+
using Volo.Abp.OpenIddict;
66
using Volo.Abp.PermissionManagement.Identity;
7-
using Volo.Abp.PermissionManagement.IdentityServer;
7+
using Volo.Abp.PermissionManagement.OpenIddict;
88

99
namespace Tasky.IdentityService;
1010

@@ -14,8 +14,8 @@ namespace Tasky.IdentityService;
1414
)]
1515
[DependsOn(typeof(AbpIdentityDomainModule))]
1616
[DependsOn(typeof(AbpPermissionManagementDomainIdentityModule))]
17-
[DependsOn(typeof(AbpIdentityServerDomainModule))]
18-
[DependsOn(typeof(AbpPermissionManagementDomainIdentityServerModule))]
17+
[DependsOn(typeof(AbpOpenIddictDomainModule))]
18+
[DependsOn(typeof(AbpPermissionManagementDomainOpenIddictModule))]
1919
public class IdentityServiceDomainModule : AbpModule
2020
{
2121

services/identity/src/Tasky.IdentityService.Domain/Tasky.IdentityService.Domain.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
<ItemGroup>
1111
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="6.0.2" />
1212
<PackageReference Include="Volo.Abp.Identity.Domain" Version="6.0.2" />
13-
<PackageReference Include="Volo.Abp.IdentityServer.Domain" Version="6.0.2" />
13+
<PackageReference Include="Volo.Abp.OpenIddict.Domain" Version="6.0.2" />
1414
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="6.0.2" />
15-
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.IdentityServer" Version="6.0.2" />
15+
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.OpenIddict" Version="6.0.2" />
1616
<ProjectReference Include="..\Tasky.IdentityService.Domain.Shared\Tasky.IdentityService.Domain.Shared.csproj" />
1717
</ItemGroup>
1818

services/identity/src/Tasky.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceDbContext.cs

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,18 @@
33
using Volo.Abp.EntityFrameworkCore;
44
using Volo.Abp.Identity;
55
using Volo.Abp.Identity.EntityFrameworkCore;
6-
using Volo.Abp.IdentityServer.ApiResources;
7-
using Volo.Abp.IdentityServer.ApiScopes;
8-
using Volo.Abp.IdentityServer.Clients;
9-
using Volo.Abp.IdentityServer.Devices;
10-
using Volo.Abp.IdentityServer.EntityFrameworkCore;
11-
using Volo.Abp.IdentityServer.Grants;
12-
using Volo.Abp.IdentityServer.IdentityResources;
6+
using Volo.Abp.OpenIddict.Applications;
7+
using Volo.Abp.OpenIddict.Authorizations;
8+
using Volo.Abp.OpenIddict.EntityFrameworkCore;
9+
using Volo.Abp.OpenIddict.Scopes;
10+
using Volo.Abp.OpenIddict.Tokens;
1311

1412
namespace Tasky.IdentityService.EntityFrameworkCore;
1513

1614
[ConnectionStringName(IdentityServiceDbProperties.ConnectionStringName)]
1715
public class IdentityServiceDbContext : AbpDbContext<IdentityServiceDbContext>,
1816
IIdentityDbContext,
19-
IIdentityServerDbContext,
17+
IOpenIddictDbContext,
2018
IIdentityServiceDbContext
2119
{
2220
public IdentityServiceDbContext(DbContextOptions<IdentityServiceDbContext> options)
@@ -30,36 +28,17 @@ public IdentityServiceDbContext(DbContextOptions<IdentityServiceDbContext> optio
3028
public DbSet<OrganizationUnit> OrganizationUnits { get; set; }
3129
public DbSet<IdentitySecurityLog> SecurityLogs { get; set; }
3230
public DbSet<IdentityLinkUser> LinkUsers { get; set; }
33-
public DbSet<ApiResource> ApiResources { get; set; }
34-
public DbSet<ApiResourceSecret> ApiResourceSecrets { get; set; }
35-
public DbSet<ApiResourceClaim> ApiResourceClaims { get; set; }
36-
public DbSet<ApiResourceScope> ApiResourceScopes { get; set; }
37-
public DbSet<ApiResourceProperty> ApiResourceProperties { get; set; }
38-
public DbSet<ApiScope> ApiScopes { get; set; }
39-
public DbSet<ApiScopeClaim> ApiScopeClaims { get; set; }
40-
public DbSet<ApiScopeProperty> ApiScopeProperties { get; set; }
41-
public DbSet<IdentityResource> IdentityResources { get; set; }
42-
public DbSet<IdentityResourceClaim> IdentityClaims { get; set; }
43-
public DbSet<IdentityResourceProperty> IdentityResourceProperties { get; set; }
44-
public DbSet<Client> Clients { get; set; }
45-
public DbSet<ClientGrantType> ClientGrantTypes { get; set; }
46-
public DbSet<ClientRedirectUri> ClientRedirectUris { get; set; }
47-
public DbSet<ClientPostLogoutRedirectUri> ClientPostLogoutRedirectUris { get; set; }
48-
public DbSet<ClientScope> ClientScopes { get; set; }
49-
public DbSet<ClientSecret> ClientSecrets { get; set; }
50-
public DbSet<ClientClaim> ClientClaims { get; set; }
51-
public DbSet<ClientIdPRestriction> ClientIdPRestrictions { get; set; }
52-
public DbSet<ClientCorsOrigin> ClientCorsOrigins { get; set; }
53-
public DbSet<ClientProperty> ClientProperties { get; set; }
54-
public DbSet<PersistedGrant> PersistedGrants { get; set; }
55-
public DbSet<DeviceFlowCodes> DeviceFlowCodes { get; set; }
31+
public DbSet<OpenIddictApplication> Applications { get; set; }
32+
public DbSet<OpenIddictAuthorization> Authorizations { get; set; }
33+
public DbSet<OpenIddictScope> Scopes { get; set; }
34+
public DbSet<OpenIddictToken> Tokens { get; set; }
5635

5736
protected override void OnModelCreating(ModelBuilder builder)
5837
{
5938
base.OnModelCreating(builder);
6039

6140
builder.ConfigureIdentityService();
6241
builder.ConfigureIdentity();
63-
builder.ConfigureIdentityServer();
42+
builder.ConfigureOpenIddict();
6443
}
6544
}

0 commit comments

Comments
 (0)