Skip to content

Commit b9f8768

Browse files
authored
Merge pull request #16 from antosubash/openiddict
Openiddict
2 parents 3a7e658 + d3bcdd0 commit b9f8768

File tree

573 files changed

+129685
-19139
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

573 files changed

+129685
-19139
lines changed

.tye/process_store

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{"pid":"11692"}
2+
{"pid":"30884"}
3+
{"pid":"16020"}
4+
{"pid":"20364"}
5+
{"pid":"42816"}
6+
{"pid":"41288"}

Tasky.sln

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tasky.ProjectService.TestBa
162162
EndProject
163163
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tasky.Shared.Microservice.Hosting", "shared\Tasky.Shared.Microservice.Hosting\Tasky.Shared.Microservice.Hosting.csproj", "{F5E002D0-009C-4C3E-97F4-6448649390CE}"
164164
EndProject
165-
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{E8E3594C-AB25-4419-9231-76690E50B329}"
165+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tasky.AuthServer", "apps\Tasky.AuthServer\Tasky.AuthServer.csproj", "{A0A6ADA8-2D94-49D9-8A07-0DD9096ED505}"
166166
EndProject
167167
Global
168168
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -398,10 +398,10 @@ Global
398398
{F5E002D0-009C-4C3E-97F4-6448649390CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
399399
{F5E002D0-009C-4C3E-97F4-6448649390CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
400400
{F5E002D0-009C-4C3E-97F4-6448649390CE}.Release|Any CPU.Build.0 = Release|Any CPU
401-
{E8E3594C-AB25-4419-9231-76690E50B329}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
402-
{E8E3594C-AB25-4419-9231-76690E50B329}.Debug|Any CPU.Build.0 = Debug|Any CPU
403-
{E8E3594C-AB25-4419-9231-76690E50B329}.Release|Any CPU.ActiveCfg = Release|Any CPU
404-
{E8E3594C-AB25-4419-9231-76690E50B329}.Release|Any CPU.Build.0 = Release|Any CPU
401+
{A0A6ADA8-2D94-49D9-8A07-0DD9096ED505}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
402+
{A0A6ADA8-2D94-49D9-8A07-0DD9096ED505}.Debug|Any CPU.Build.0 = Debug|Any CPU
403+
{A0A6ADA8-2D94-49D9-8A07-0DD9096ED505}.Release|Any CPU.ActiveCfg = Release|Any CPU
404+
{A0A6ADA8-2D94-49D9-8A07-0DD9096ED505}.Release|Any CPU.Build.0 = Release|Any CPU
405405
EndGlobalSection
406406
GlobalSection(SolutionProperties) = preSolution
407407
HideSolutionNode = FALSE
@@ -480,6 +480,7 @@ Global
480480
{EA1859AB-5FEE-4A7C-AD1F-021DCE66ECBF} = {A5966E90-BBCA-45E8-B26C-4A909479480C}
481481
{CBB5D4AD-848F-4963-A610-E9CB7B61F921} = {A5966E90-BBCA-45E8-B26C-4A909479480C}
482482
{F5E002D0-009C-4C3E-97F4-6448649390CE} = {E6A2A6FA-BA0D-41ED-88BA-02EE33083AA5}
483+
{A0A6ADA8-2D94-49D9-8A07-0DD9096ED505} = {5E41397F-59A3-47C4-9939-CB6496177D36}
483484
EndGlobalSection
484485
GlobalSection(ExtensibilityGlobals) = postSolution
485486
SolutionGuid = {CF0783F4-2CF9-4E4A-A123-F4E3832F6122}

apps/Tasky.AuthServer/Logs/logs.txt

Lines changed: 1097 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
@page
2+
@using Microsoft.AspNetCore.Http.Extensions
3+
@using Microsoft.AspNetCore.Mvc.Localization
4+
@using Tasky.Pages
5+
@using Volo.Abp.Users
6+
@using Volo.Abp.AspNetCore.Mvc.UI.Theming
7+
@using Volo.Abp.Ui.Branding
8+
@model IndexModel
9+
@inject ICurrentUser CurrentUser
10+
@inject IBrandingProvider BrandingProvider
11+
@inject ITheme Theme
12+
13+
@{
14+
Layout = Theme.GetEmptyLayout();
15+
}
16+
17+
<div class="d-flex align-items-center" style="min-height: 100vh;">
18+
<div class="container">
19+
<abp-row>
20+
21+
<div class="col mx-auto account-column">
22+
<div class="account-brand p-4 text-center mb-1">
23+
24+
@if (!BrandingProvider.LogoUrl.IsNullOrEmpty())
25+
{
26+
<a class="navbar-brand" href="/" alt="@BrandingProvider.AppName"></a>
27+
}
28+
else
29+
{
30+
<h1>@BrandingProvider.AppName</h1>
31+
}
32+
</div>
33+
<abp-card>
34+
35+
<abp-card-body>
36+
37+
<div class="container">
38+
<abp-row>
39+
<abp-column size="_9">
40+
41+
<div class="d-flex align-items-center">
42+
<div class="me-3 p-2">
43+
<i class="fa fa-user d-block" style="font-size: 10em; color: #12b900"></i>
44+
</div>
45+
<div class="p2">
46+
@if (CurrentUser.IsAuthenticated)
47+
{
48+
<span class="fs-16">
49+
Welcome <span class="fw-7">@CurrentUser.UserName</span>
50+
</span>
51+
<span class="fs-14 d-block text-dark-800 opacity-75 mb-1">@CurrentUser.Email</span>
52+
<div class="d-grid gap-2">
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>
55+
</div>
56+
}
57+
else
58+
{
59+
<a abp-button="Primary" asp-controller="Login" asp-action="Index" asp-area="Account">Login</a>
60+
}
61+
</div>
62+
63+
</div>
64+
</abp-column>
65+
<abp-column size="_3">
66+
<div class="ml-auto p-2 float-end">
67+
<abp-dropdown>
68+
<abp-dropdown-button text="@Model.CurrentLanguage" />
69+
<abp-dropdown-menu>
70+
@foreach (var language in Model.Languages)
71+
{
72+
<abp-dropdown-item href="@Url.Content($"~/Abp/Languages/Switch?culture={language.CultureName}&uiCulture={language.UiCultureName}&returnUrl={System.Net.WebUtility.UrlEncode(Request.GetEncodedPathAndQuery())}")">@language.DisplayName</abp-dropdown-item>
73+
}
74+
</abp-dropdown-menu>
75+
</abp-dropdown>
76+
</div>
77+
</abp-column>
78+
79+
</abp-row>
80+
<hr class="m-4" />
81+
82+
<abp-row>
83+
84+
@foreach (var application in Model.Applications)
85+
{
86+
<abp-column size-md="_4" class="mb-2">
87+
<abp-card>
88+
<abp-card-body>
89+
90+
@if (!application.LogoUri.IsNullOrEmpty())
91+
{
92+
<div class="mx-auto">
93+
<img src="@application.LogoUri" style="height:64px" class="mb-3" />
94+
</div>
95+
}
96+
97+
<h4>@application.DisplayName</h4>
98+
<span class="text-muted">@application.ClientUri</span>
99+
<div class="mt-1">
100+
<a abp-button="Outline_Secondary" href="@application.ClientUri">Visit</a>
101+
</div>
102+
</abp-card-body>
103+
</abp-card>
104+
</abp-column>
105+
}
106+
107+
</abp-row>
108+
</div>
109+
110+
</abp-card-body>
111+
112+
</abp-card>
113+
</div>
114+
115+
</abp-row>
116+
</div>
117+
</div>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System.Collections.Generic;
2+
using System.Globalization;
3+
using System.Threading.Tasks;
4+
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
5+
using Volo.Abp.Localization;
6+
using Volo.Abp.OpenIddict.Applications;
7+
8+
namespace Tasky.Pages;
9+
10+
public class IndexModel : AbpPageModel
11+
{
12+
public List<OpenIddictApplication> Applications { get; protected set; }
13+
14+
public IReadOnlyList<LanguageInfo> Languages { get; protected set; }
15+
16+
public string CurrentLanguage { get; protected set; }
17+
18+
protected IOpenIddictApplicationRepository OpenIdApplicationRepository { get; }
19+
20+
protected ILanguageProvider LanguageProvider { get; }
21+
22+
public IndexModel(IOpenIddictApplicationRepository openIdApplicationmRepository, ILanguageProvider languageProvider)
23+
{
24+
OpenIdApplicationRepository = openIdApplicationmRepository;
25+
LanguageProvider = languageProvider;
26+
}
27+
28+
public async Task OnGetAsync()
29+
{
30+
Applications = await OpenIdApplicationRepository.GetListAsync();
31+
32+
Languages = await LanguageProvider.GetLanguagesAsync();
33+
CurrentLanguage = CultureInfo.CurrentCulture.DisplayName;
34+
}
35+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
2+
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
3+
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
4+
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling

apps/Tasky.AuthServer/Program.cs

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
using System;
2+
using System.Threading.Tasks;
3+
using Microsoft.AspNetCore.Builder;
4+
using Microsoft.Extensions.DependencyInjection;
5+
using Microsoft.Extensions.Hosting;
6+
using Serilog;
7+
using Serilog.Events;
8+
9+
namespace Tasky;
10+
11+
public class Program
12+
{
13+
public async static Task<int> Main(string[] args)
14+
{
15+
Log.Logger = new LoggerConfiguration()
16+
#if DEBUG
17+
.MinimumLevel.Debug()
18+
#else
19+
.MinimumLevel.Information()
20+
#endif
21+
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
22+
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
23+
.Enrich.FromLogContext()
24+
.WriteTo.Async(c => c.File("Logs/logs.txt"))
25+
.WriteTo.Async(c => c.Console())
26+
.CreateLogger();
27+
28+
try
29+
{
30+
Log.Information("Starting Tasky.AuthServer.");
31+
var builder = WebApplication.CreateBuilder(args);
32+
builder.Host.AddAppSettingsSecretsJson()
33+
.UseAutofac()
34+
.UseSerilog();
35+
await builder.AddApplicationAsync<TaskyAuthServerModule>();
36+
var app = builder.Build();
37+
await app.InitializeApplicationAsync();
38+
await app.RunAsync();
39+
return 0;
40+
}
41+
catch (Exception ex)
42+
{
43+
Log.Fatal(ex, "Tasky.AuthServer terminated unexpectedly!");
44+
return 1;
45+
}
46+
finally
47+
{
48+
Log.CloseAndFlush();
49+
}
50+
}
51+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"iisSettings": {
3+
"windowsAuthentication": false,
4+
"anonymousAuthentication": true,
5+
"iisExpress": {
6+
"applicationUrl": "https://localhost:44321",
7+
"sslPort": 44321
8+
}
9+
},
10+
"profiles": {
11+
"IIS Express": {
12+
"commandName": "IISExpress",
13+
"launchBrowser": true,
14+
"environmentVariables": {
15+
"ASPNETCORE_ENVIRONMENT": "Development"
16+
}
17+
},
18+
"Tasky.AuthServer": {
19+
"commandName": "Project",
20+
"launchBrowser": true,
21+
"applicationUrl": "https://localhost:7600;http://localhost:7601",
22+
"environmentVariables": {
23+
"ASPNETCORE_ENVIRONMENT": "Development"
24+
}
25+
}
26+
}
27+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
<PropertyGroup>
3+
<TargetFramework>net6.0</TargetFramework>
4+
<RootNamespace>Tasky</RootNamespace>
5+
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
6+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
7+
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
8+
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
9+
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
10+
<PreserveCompilationReferences>true</PreserveCompilationReferences>
11+
<UserSecretsId>Tasky-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
12+
</PropertyGroup>
13+
14+
<ItemGroup>
15+
<Compile Remove="Logs\**" />
16+
<Content Remove="Logs\**" />
17+
<EmbeddedResource Remove="Logs\**" />
18+
<None Remove="Logs\**" />
19+
</ItemGroup>
20+
21+
<ItemGroup>
22+
<None Update="Pages\**\*.js">
23+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
24+
</None>
25+
<None Update="Pages\**\*.css">
26+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
27+
</None>
28+
</ItemGroup>
29+
30+
<ItemGroup>
31+
<PackageReference Include="Serilog.AspNetCore" Version="6.1.0" />
32+
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
33+
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.5" />
34+
<PackageReference Include="DistributedLock.Redis" Version="1.0.2" />
35+
</ItemGroup>
36+
37+
<ItemGroup>
38+
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite" Version="1.0.2" />
39+
</ItemGroup>
40+
41+
<ItemGroup>
42+
<PackageReference Include="Volo.Abp.Autofac" Version="6.0.2" />
43+
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="6.0.2" />
44+
<PackageReference Include="Volo.Abp.DistributedLocking" Version="6.0.2" />
45+
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="6.0.2" />
46+
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="6.0.2" />
47+
<PackageReference Include="Volo.Abp.Account.Application" Version="6.0.2" />
48+
<PackageReference Include="Volo.Abp.Account.HttpApi" Version="6.0.2" />
49+
</ItemGroup>
50+
51+
<ItemGroup>
52+
<ProjectReference Include="..\..\services\administration\src\Tasky.AdministrationService.EntityFrameworkCore\Tasky.AdministrationService.EntityFrameworkCore.csproj" />
53+
<ProjectReference Include="..\..\services\identity\src\Tasky.IdentityService.EntityFrameworkCore\Tasky.IdentityService.EntityFrameworkCore.csproj" />
54+
<ProjectReference Include="..\..\services\saas\src\Tasky.SaasService.EntityFrameworkCore\Tasky.SaasService.EntityFrameworkCore.csproj" />
55+
<ProjectReference Include="..\..\shared\Tasky.Shared.Microservice.Hosting\Tasky.Shared.Microservice.Hosting.csproj" />
56+
</ItemGroup>
57+
58+
</Project>

0 commit comments

Comments
 (0)