Commit 2d5e9c5
Logto (#1241)
* Add Logto with PostgreSQL and Redis integration (#815)
- Introduced `CommunityToolkit.Aspire.Hosting.Logto` project for integrating Logto with PostgreSQL and Redis.
- Added extension methods for configuring Logto containers, health checks, and resource dependencies.
- Created test projects for validating Logto container configuration and health checks.
- Added example projects under `examples/logto` showcasing Logto integration with PostgreSQL and Redis.
- Updated solution file and package references to include the new Logto project.
* Add Logto client hosting support (#817)
- Introduced `CommunityToolkit.Aspire.Hosting.Logto.Client` project for integrating Logto client configuration.
- Added `LogtoClientBuilder` for seamless setup of Logto client services in `IHostApplicationBuilder`.
- Implemented connection string helper for parsing Logto connection strings.
- Updated solution and centralized package references to include the new project.
* Add Logto Client API example project
- Introduced `CommunityToolkit.Aspire.Hosting.Logto.ClientApi` under `examples/logto` to demonstrate Logto client integration.
- Added project configuration files (`Program.cs`, `appsettings.json`, `launchSettings.json`) for application setup.
- Renamed `AddLogtoClient` to `AddLogtoSDKClient` in `LogtoClientBuilder`.
- Updated solution and centralized package references to include the new example project and dependencies.
* Add tests and enhancements for Logto Client integration
- Introduced a new test project `CommunityToolkit.Aspire.Hosting.Logto.Client.Tests` for validating Logto client behavior.
- Added integration and unit tests for `LogtoClientBuilder` and `LogtoConnectionStringHelper`.
- Implemented OIDC authentication and JWT bearer support in `LogtoClientBuilder`.
- Extended `Program.cs` in `ClientApi` example with authentication routes (`/me`, `/signin`, `/signout`).
- Updated dependencies and centralized package references for added functionalities.
- Modified project and solution files to include updated references.
* Refactor Logto client integration
- Updated method names from `AddLogtoSDKClient` to `AddLogtoOIDC` for better alignment with OIDC usage.
- Enhanced `AddLogtoOIDC` and `AddLogtoJwtBearer` methods to support additional configuration options.
- Added `Microsoft.Extensions.DependencyInjection.Abstractions` package reference to support service registration.
- Updated tests to reflect the method renaming and new configuration capabilities.
- Extended `Program.cs` in the ClientApi example to include `UseAuthentication` and `UseAuthorization`.
- Improved consistency and readability of XML documentation across updated methods.
- Centralized package references for additional dependencies in `Directory.Packages.props`.
* Remove unused `/signout` route from ClientApi example
* Rename `ClientApi` example to `ClientOIDC` and update method signatures
- Changed the `ClientApi` project to `ClientOIDC` for better alignment with OIDC standards.
- Updated method signatures in `LogtoClientBuilder` to use `appIndeficator` instead of `appId` and support multiple audience identifiers.
- Improved XML documentation consistency for updated methods.
- Adjusted solution, project references, and configuration files to reflect the renaming and API changes.
* Add `ClientJWT` example with Logto JWT authentication support
- Introduced `CommunityToolkit.Aspire.Hosting.Logto.ClientJWT` project under `examples/logto` to demonstrate Logto JWT authentication.
- Configured authentication and authorization middleware with Logto's JWT Bearer scheme in `Program.cs`.
- Added example routes (`/secure` and `/tokens`) for testing secured endpoint access and token retrieval.
- Updated `AppHost` to include `ClientJWT` project as a dependency.
- Improved XML documentation for `AddLogtoJwtBearer` methods, including updated parameter descriptions and exception handling.
* Update examples/logto/CommunityToolkit.Aspire.Hosting.Logto.AppHost/CommunityToolkit.Aspire.Hosting.Logto.AppHost.csproj
Co-authored-by: Aaron Powell <me@aaron-powell.com>
* Update src/CommunityToolkit.Aspire.Hosting.Logto.Client/CommunityToolkit.Aspire.Hosting.Logto.Client.csproj
Co-authored-by: Aaron Powell <me@aaron-powell.com>
* Remove unused package references and resolve merge conflict in project and package configuration files
* Update package versions and project SDKs for Logto client integration
- Upgraded `Aspire.AppHost.Sdk` from `13.0.0` to `13.2.0` in `examples/logto/CommunityToolkit.Aspire.Hosting.Logto.AppHost.csproj`.
- Added `Microsoft.AspNetCore.Authentication.JwtBearer` and `Microsoft.AspNetCore.Authentication.OpenIdConnect` package versions to `Directory.Packages.props`.
* Update `ClientJWT` example to use a constant for API audience in Logto JWT configuration
- Replaced hardcoded API audience with a `const` string in `Program.cs` for improved readability and maintainability.
* Remove `<IsPreview>` property from Logto project
* Rename `Hosting.Logto.Client` to `Logto.Client` and adjust related references
- Renamed `CommunityToolkit.Aspire.Hosting.Logto.Client` to `CommunityToolkit.Aspire.Logto.Client` for improved namespace consistency.
- Updated all project, namespace, and solution references to reflect the renaming.
- Adjusted example projects (`ClientJWT` and `ClientOIDC`) and `AppHost` references accordingly.
* Add `WithDeprecationTracing` method to enable Node.js deprecation tracing in Logto container
* Add `Hosting.Logto.Tests` and `Logto.Client.Tests` to test matrix in GitHub Actions
* Refactor Logto configuration: introduce validation for Logto options and add support for data volume mapping.
* Refactor `AppHostTest` to use `AspireIntegrationTestFixture`; add `AppHost` project reference to test project
* Allow null `port` and `adminPort` in `WithResourcePort` to enable random host port assignment.
* Update Logto container tag to v1.38
* Refactor `LogtoContainerResource` to `LogtoResource` and update related APIs and tests. Streamline naming for consistency.
* Set default HTTP and admin ports in `WithResourcePort` method of `LogtoBuilderExtensions`.
* Update examples/logto/CommunityToolkit.Aspire.Hosting.Logto.AppHost/CommunityToolkit.Aspire.Hosting.Logto.AppHost.csproj
* Add Logto integration: introduce `LogtoResource` and client builders with OIDC and JWT Bearer configurations. Update APIs, examples, and tests.
* Apply suggestion from @aaronpowell
* Fixing build errors
* Fix Logto test startup
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* not using persisted db
This seems to be messing with local dev auth from postgres.
* Testing a better endpoint
* deleting the generated files
* Adding missing README.md
---------
Co-authored-by: Aaron Powell <me@aaron-powell.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent f8169bb commit 2d5e9c5
34 files changed
Lines changed: 1746 additions & 0 deletions
File tree
- examples/logto
- CommunityToolkit.Aspire.Hosting.Logto.AppHost
- Properties
- CommunityToolkit.Aspire.Hosting.Logto.ServiceDefaults
- CommunityToolkit.Aspire.Logto.ClientJWT
- Properties
- CommunityToolkit.Aspire.Logto.ClientOIDC
- Properties
- src
- CommunityToolkit.Aspire.Hosting.Logto
- CommunityToolkit.Aspire.Logto.Client
- tests
- CommunityToolkit.Aspire.Hosting.Logto.Tests
- CommunityToolkit.Aspire.Logto.Client.Tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
84 | 90 | | |
85 | 91 | | |
86 | 92 | | |
| |||
219 | 225 | | |
220 | 226 | | |
221 | 227 | | |
| 228 | + | |
222 | 229 | | |
223 | 230 | | |
224 | 231 | | |
| |||
246 | 253 | | |
247 | 254 | | |
248 | 255 | | |
| 256 | + | |
249 | 257 | | |
250 | 258 | | |
251 | 259 | | |
| |||
283 | 291 | | |
284 | 292 | | |
285 | 293 | | |
| 294 | + | |
286 | 295 | | |
287 | 296 | | |
288 | 297 | | |
| |||
309 | 318 | | |
310 | 319 | | |
311 | 320 | | |
| 321 | + | |
312 | 322 | | |
313 | 323 | | |
314 | 324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
Lines changed: 128 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments