Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
concurrency:
group: ${{ github.repository }}
cancel-in-progress: false
Expand Down
12 changes: 3 additions & 9 deletions Api.ApiClients.Audit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ Nano is referenced directly from source (not via NuGet packages) and is expected

> ⚠️ Remember to set the docker-compose project as startup project, before running the solution in Visual Studio.

> 💡 Explore API requests for this lesson in our **[Public Nano Workspace on Postman](https://www.postman.com/nanocore/nano-lessons)**.
> 💡 Explore API requests for this lesson in our **[Public Nano Workspace on Postman](https://www.postman.com/nanocore/nano-core/collection/g2z9po5/nano-lessons)**.

***

## Table of Contents
* [Summary](#summary)

## Summary
This application builds on **[Api.ApiClients](https://github.com/Nano-Core/Nano.Lessons/tree/master/Api.ApiClients)**. All the custom methods have been removed and replaced
This application builds on **[Api.ApiClients](https://github.com/Nano-Core/Nano.Lessons/blob/master/Api.ApiClients)**. All the custom methods have been removed and replaced
with corresponding methods for each audit controller operation in the inner service.

The inner application has a data provider enabled to demonstrate the generic API client integration with Nano entity models. A `NanoApiClient` implementation, derived from
Expand All @@ -33,10 +33,4 @@ The following endpoint is available for testing.
| -------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `http://localhost:8080/api/examples/create` | Returns a `200 OK` response. Creates an `Example` with nested `ExampleNavigation` which is audited. |

> 📖 Learn more about **[Nano Api Clients](https://github.com/Nano-Core/Nano.Library/tree/master/Nano.App/README.md#api-clients)**.






> 📖 Learn more about **[Nano Api Clients](https://github.com/Nano-Core/Nano.Library/blob/master/Nano.App/README.md#api-clients)**.
6 changes: 3 additions & 3 deletions Api.ApiClients.Entity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ Nano is referenced directly from source (not via NuGet packages) and is expected

> ⚠️ Remember to set the docker-compose project as startup project, before running the solution in Visual Studio.

> 💡 Explore API requests for this lesson in our **[Public Nano Workspace on Postman](https://www.postman.com/nanocore/nano-lessons)**.
> 💡 Explore API requests for this lesson in our **[Public Nano Workspace on Postman](https://www.postman.com/nanocore/nano-core/collection/g2z9po5/nano-lessons)**.

***

## Table of Contents
* [Summary](#summary)

## Summary
This application builds on **[Api.ApiClients](https://github.com/Nano-Core/Nano.Lessons/tree/master/Api.ApiClients)**. All the custom methods have been removed and replaced
This application builds on **[Api.ApiClients](https://github.com/Nano-Core/Nano.Lessons/blob/master/Api.ApiClients)**. All the custom methods have been removed and replaced
with corresponding methods for each entity controller operation in the inner service.

The inner application has a data provider enabled to demonstrate the generic API client integration with Nano entity models. A `NanoApiClient` implementation, derived from
Expand All @@ -27,4 +27,4 @@ The endpoints mirror those of the entity controller in the inner service, allowi
real-world scenario, this structure would typically differ. The outer application would define its own request and response contracts tailored to its domain. However, for
simplicity and clarity in this example, the responses from the inner service are passed directly through the outer API.

> 📖 Learn more about **[Nano Api Clients](https://github.com/Nano-Core/Nano.Library/tree/master/Nano.App/README.md#api-clients)**.
> 📖 Learn more about **[Nano Api Clients](https://github.com/Nano-Core/Nano.Library/blob/master/Nano.App/README.md#api-clients)**.
6 changes: 3 additions & 3 deletions Api.ApiClients.RootLogIn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ Nano is referenced directly from source (not via NuGet packages) and is expected

> ⚠️ Remember to set the docker-compose project as startup project, before running the solution in Visual Studio.

> 💡 Explore API requests for this lesson in our **[Public Nano Workspace on Postman](https://www.postman.com/nanocore/nano-lessons)**.
> 💡 Explore API requests for this lesson in our **[Public Nano Workspace on Postman](https://www.postman.com/nanocore/nano-core/collection/g2z9po5/nano-lessons)**.

***

## Table of Contents
* [Summary](#summary)

## Summary
This application builds on **[Api.ApiClients](https://github.com/Nano-Core/Nano.Lessons/tree/master/Api.ApiClients)**. All custom methods have been removed and replaced
This application builds on **[Api.ApiClients](https://github.com/Nano-Core/Nano.Lessons/blob/master/Api.ApiClients)**. All custom methods have been removed and replaced
with a new method that triggers the configured root login.

The service is configured with Root Login and JWT authentication enabled, along with a concrete implementation of `BaseAuthController`. When invoking methods through the
Expand All @@ -28,4 +28,4 @@ The following endpoint is available for testing.
| ------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- |
| `http://localhost:8080/api/examples/auto-authenticate-root` | Returns a `200 OK` response. Uses the API client’s automatic root login to obtain and return an access token. |

> 📖 Learn more about **[Nano Api Clients](https://github.com/Nano-Core/Nano.Library/tree/master/Nano.App/README.md#api-clients)**.
> 📖 Learn more about **[Nano Api Clients](https://github.com/Nano-Core/Nano.Library/blob/master/Nano.App/README.md#api-clients)**.
8 changes: 4 additions & 4 deletions Api.ApiClients/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Nano is referenced directly from source (not via NuGet packages) and is expected

> ⚠️ Remember to set the docker-compose project as startup project, before running the solution in Visual Studio.

> 💡 Explore API requests for this lesson in our **[Public Nano Workspace on Postman](https://www.postman.com/nanocore/nano-lessons)**.
> 💡 Explore API requests for this lesson in our **[Public Nano Workspace on Postman](https://www.postman.com/nanocore/nano-core/collection/g2z9po5/nano-lessons)**.

***

Expand All @@ -17,7 +17,7 @@ Nano is referenced directly from source (not via NuGet packages) and is expected
* [Configuration](#configuration)

## Summary
This application builds on **[Api.Blank](https://github.com/Nano-Core/Nano.Lessons/tree/master/Api._Blank)**.
This application builds on **[Api.Blank](https://github.com/Nano-Core/Nano.Lessons/blob/master/Api._Blank)**.

This lesson demonstrates how to connect one API application to another using Nano’s built-in API client, enabling seamless communication between services.

Expand All @@ -28,7 +28,7 @@ the outer application has been configured to include the API client, enabling it
A health check is configured to target the application of the api-client.
Open **[http://localhost:8080/healthz](http://localhost:8080/healthz)** to view the health-check status in the JSON response.

> 📖 Learn more about **[Nano Health Checks](https://github.com/Nano-Core/Nano.Library/tree/master/Nano.App.Api/README.md#health-checks)**.
> 📖 Learn more about **[Nano Health Checks](https://github.com/Nano-Core/Nano.Library/blob/master/Nano.App.Api/README.md#health-checks)**.

The following endpoint is available for testing.

Expand All @@ -41,7 +41,7 @@ The following endpoint is available for testing.
| `http://localhost:8080/api/examples/problem-details-exception` | Returns a `417 Expectation Failed` response. A `ProblemDetailsException` is thrown to demonstrate structured error handling using Problem Details. |
| `http://localhost:8080/api/examples/request-tracing` | Returns a `200 OK` response. The `X-Request-Id` header is extracted from the request and returned in the response for traceability purposes. |

> 📖 Learn more about **[Nano Api Clients](https://github.com/Nano-Core/Nano.Library/tree/master/Nano.App/README.md#api-clients)**.
> 📖 Learn more about **[Nano Api Clients](https://github.com/Nano-Core/Nano.Library/blob/master/Nano.App/README.md#api-clients)**.

## Configuration
Configured the application with a connection to the `NanoApiClient`.
Expand Down
8 changes: 4 additions & 4 deletions Api.Auth.External.Custom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Nano is referenced directly from source (not via NuGet packages) and is expected

> ⚠️ Remember to set the docker-compose project as startup project, before running the solution in Visual Studio.

> 💡 Explore API requests for this lesson in our **[Public Nano Workspace on Postman](https://www.postman.com/nanocore/nano-lessons)**.
> 💡 Explore API requests for this lesson in our **[Public Nano Workspace on Postman](https://www.postman.com/nanocore/nano-core/collection/g2z9po5/nano-lessons)**.

***

Expand All @@ -19,7 +19,7 @@ Nano is referenced directly from source (not via NuGet packages) and is expected
* [GitHub Actions](#github-actions)

## Summary
This application builds on **[Api.Blank](https://github.com/Nano-Core/Nano.Lessons/tree/master/Api._Blank)** and adds a derived `AuthController` as well as a simple test controller
This application builds on **[Api.Blank](https://github.com/Nano-Core/Nano.Lessons/blob/master/Api._Blank)** and adds a derived `AuthController` as well as a simple test controller
that inherits from the top-level Nano `BaseController`.

The JWT authentication scheme has been configured, and a `BaseAuthExternalRepository<TFlow>` implementation named `ExternalProviderCustomRepository`, with `Custom` as provider-name,
Expand All @@ -31,7 +31,7 @@ provider in Nano.
API documentation has been configured to make it easier to explore the available actions in the `AuthController`. Any actions that are not enabled due to omitted configuration
are automatically excluded. The API documentation is available at: **http://localhost:8080/docs**.

> 📖 Learn more about **[Nano API Documentation](https://github.com/Nano-Core/Nano.Library/tree/master/Nano.App.Api/README.md#documentation)**.
> 📖 Learn more about **[Nano API Documentation](https://github.com/Nano-Core/Nano.Library/blob/master/Nano.App.Api/README.md#documentation)**.

The following endpoint from the auth controller is available for testing.

Expand All @@ -46,7 +46,7 @@ Additionally, the following endpoint is available for testing authorization.
| -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `http://localhost:8080/api/examples/authenticate` | Returns a simple `200 OK` response, when JWT authorization is successful, and otherwise a `401 Unauthorized`. |

> 📖 Learn more about **[Nano Authentication](https://github.com/Nano-Core/Nano.Library/tree/master/Nano.App.Api/README.md#authentication)**.
> 📖 Learn more about **[Nano Authentication](https://github.com/Nano-Core/Nano.Library/blob/master/Nano.App.Api/README.md#authentication)**.

## Configuration
Configured the application with the necessary authentication setup.
Expand Down
8 changes: 4 additions & 4 deletions Api.Auth.RootLogin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Nano is referenced directly from source (not via NuGet packages) and is expected

> ⚠️ Remember to set the docker-compose project as startup project, before running the solution in Visual Studio.

> 💡 Explore API requests for this lesson in our **[Public Nano Workspace on Postman](https://www.postman.com/nanocore/nano-lessons)**.
> 💡 Explore API requests for this lesson in our **[Public Nano Workspace on Postman](https://www.postman.com/nanocore/nano-core/collection/g2z9po5/nano-lessons)**.

***

Expand All @@ -19,7 +19,7 @@ Nano is referenced directly from source (not via NuGet packages) and is expected
* [GitHub Actions](#github-actions)

## Summary
This application builds on **[Api.Blank](https://github.com/Nano-Core/Nano.Lessons/tree/master/Api._Blank)** and adds a derived `AuthController` as well as a simple test controller
This application builds on **[Api.Blank](https://github.com/Nano-Core/Nano.Lessons/blob/master/Api._Blank)** and adds a derived `AuthController` as well as a simple test controller
that inherits from the top-level Nano `BaseController`.

The JWT authentication scheme has been configured. Simply invoke the root login endpoint and use the returned JWT token in the `Authorization` header to authenticate when calling
Expand All @@ -28,7 +28,7 @@ the example controller endpoint.
API documentation has been configured to make it easier to explore the available actions in the `AuthController`. Any actions that are not enabled due to omitted configuration
are automatically excluded. The API documentation is available at: **http://localhost:8080/docs**.

> 📖 Learn more about **[Nano API Documentation](https://github.com/Nano-Core/Nano.Library/tree/master/Nano.App.Api/README.md#documentation)**.
> 📖 Learn more about **[Nano API Documentation](https://github.com/Nano-Core/Nano.Library/blob/master/Nano.App.Api/README.md#documentation)**.

The following endpoint from the auth controller is available for testing.

Expand All @@ -42,7 +42,7 @@ Additionally, the following endpoint is available for testing authorization.
| -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `http://localhost:8080/api/examples/authenticate` | Returns a simple `200 OK` response, when JWT authorization is successful, and otherwise a `401 Unauthorized`. |

> 📖 Learn more about **[Nano Authentication](https://github.com/Nano-Core/Nano.Library/tree/master/Nano.App.Api/README.md#authentication)**.
> 📖 Learn more about **[Nano Authentication](https://github.com/Nano-Core/Nano.Library/blob/master/Nano.App.Api/README.md#authentication)**.

## Configuration
Configured the application with the necessary authentication setup.
Expand Down
8 changes: 4 additions & 4 deletions Api.Authorization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ Nano is referenced directly from source (not via NuGet packages) and is expected

> ⚠️ Remember to set the docker-compose project as startup project, before running the solution in Visual Studio.

> 💡 Explore API requests for this lesson in our **[Public Nano Workspace on Postman](https://www.postman.com/nanocore/nano-lessons)**.
> 💡 Explore API requests for this lesson in our **[Public Nano Workspace on Postman](https://www.postman.com/nanocore/nano-core/collection/g2z9po5/nano-lessons)**.

***

## Table of Contents
* [Summary](#summary)

## Summary
This application builds on **[Api.Auth.RootLogin](https://github.com/Nano-Core/Nano.Lessons/tree/master/Auth.RootLogin)**.
This application builds on **[Api.Auth.RootLogin](https://github.com/Nano-Core/Nano.Lessons/blob/master/Api.Auth.RootLogin)**.

A custom authorization policy has been configured for the application. The `ServiceCollectionExtensions.AddCustomAuthorizationPolicy(...)` method adds the `CustomPolicy`,
and the `/forbidden` endpoint enforces the policy using a custom `[Authorize(Policy = "CustomPolicy")]` annotation. The policy itself requires the JWT token to contain
Expand All @@ -28,7 +28,7 @@ are automatically excluded. In this example, only the root login action is expos
API documentation has been configured to make it easier to explore the available actions in the `AuthController`. Any actions that are not enabled due to omitted configuration
are automatically excluded. The API documentation is available at: **http://localhost:8080/docs**.

> 📖 Learn more about **[Nano API Documentation](https://github.com/Nano-Core/Nano.Library/tree/master/Nano.App.Api/README.md#documentation)**.
> 📖 Learn more about **[Nano API Documentation](https://github.com/Nano-Core/Nano.Library/blob/master/Nano.App.Api/README.md#documentation)**.

The following endpoint from the auth controller is available for testing.

Expand All @@ -43,4 +43,4 @@ Additionally, the following endpoint is available for testing authorization.
| `http://localhost:8080/api/examples/authenticate` | Returns a simple `200 OK` response, when JWT authorization is successful. |
| `http://localhost:8080/api/examples/forbidden` | Returns a simple `200 OK` response, when JWT authorization is successful with `CustomClaim`, otherwise returns `403 FORBIDDEN` response. |

> 📖 Learn more about **[Nano Authentication](https://github.com/Nano-Core/Nano.Library/tree/master/Nano.App.Api/README.md#authentication)**.
> 📖 Learn more about **[Nano Authentication](https://github.com/Nano-Core/Nano.Library/blob/master/Nano.App.Api/README.md#authentication)**.
6 changes: 3 additions & 3 deletions Api.ContentNegotiation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ Nano is referenced directly from source (not via NuGet packages) and is expected

> ⚠️ Remember to set the docker-compose project as startup project, before running the solution in Visual Studio.

> 💡 Explore API requests for this lesson in our **[Public Nano Workspace on Postman](https://www.postman.com/nanocore/nano-lessons)**.
> 💡 Explore API requests for this lesson in our **[Public Nano Workspace on Postman](https://www.postman.com/nanocore/nano-core/collection/g2z9po5/nano-lessons)**.

***

## Table of Contents
* [Summary](#summary)

## Summary
This application builds on **[Api.Blank](https://github.com/Nano-Core/Nano.Lessons/tree/master/Api._Blank)** and adds a simple test controller
This application builds on **[Api.Blank](https://github.com/Nano-Core/Nano.Lessons/blob/master/Api._Blank)** and adds a simple test controller
that inherits from the top-level Nano `BaseController`.

This example demonstrates how Nano handles a missing `Accept` header by defaulting the response format to JSON.
Expand All @@ -27,4 +27,4 @@ The following endpoint is available for testing:
| --------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `http://localhost:8080/api/examples/content-negotiation` | Returns a simple `200 OK` response, no matter if `Accept` header is set or not. |

> 📖 Learn more about **[Nano Content Negotiation](https://github.com/Nano-Core/Nano.Library/tree/master/Nano.App.Api/README.md#content-negotiation)**.
> 📖 Learn more about **[Nano Content Negotiation](https://github.com/Nano-Core/Nano.Library/blob/master/Nano.App.Api/README.md#content-negotiation)**.
6 changes: 3 additions & 3 deletions Api.Cookies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ Nano is referenced directly from source (not via NuGet packages) and is expected

> ⚠️ Remember to set the docker-compose project as startup project, before running the solution in Visual Studio.

> 💡 Explore API requests for this lesson in our **[Public Nano Workspace on Postman](https://www.postman.com/nanocore/nano-lessons)**.
> 💡 Explore API requests for this lesson in our **[Public Nano Workspace on Postman](https://www.postman.com/nanocore/nano-core/collection/g2z9po5/nano-lessons)**.

***

## Table of Contents
* [Summary](#summary)

## Summary
This application builds on **[Api.Blank](https://github.com/Nano-Core/Nano.Lessons/tree/master/Api._Blank)** and adds a simple test controller
This application builds on **[Api.Blank](https://github.com/Nano-Core/Nano.Lessons/blob/master/Api._Blank)** and adds a simple test controller
that inherits from the top-level Nano `BaseController`.

This example demonstrates the use of cookies in a Nano application.
Expand All @@ -29,5 +29,5 @@ The following endpoint is available for testing:
| `http://localhost:8080/api/examples/get-cookie` | Gets a cookie if set and returns a `200 OK`. |
| `http://localhost:8080/api/examples/delete-cookie` | Deletes the cookie and returns a `200 OK`. |

> 📖 Learn more about **[Nano Cookies](https://github.com/Nano-Core/Nano.Library/tree/master/Nano.App.Apid#cookies)**.
> 📖 Learn more about **[Nano Cookies](https://github.com/Nano-Core/Nano.Library/blob/master/Nano.App.Api#cookies)**.

Loading