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
2 changes: 2 additions & 0 deletions doc/Learn/Authentication/AuthenticationOverview.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ uid: Uno.Extensions.Authentication.Overview
---
# Authentication

> **UnoFeatures:** `Authentication`, `AuthenticationMsal`, or `AuthenticationOidc` (add to `<UnoFeatures>` in your `.csproj`)

Uno.Extensions.Authentication is designed to make it simple to add authentication to an application. Authenticating a user may be used to restrict access to specific parts of the application, or in order to supply an access token when calling a back-end service.

There are two aspects to the Authentication extensions:
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/Authentication/HowTo-Authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ uid: Uno.Extensions.Authentication.HowToAuthentication
---
# How-To: Get Started with Authentication

> **UnoFeatures:** `Authentication` (add to `<UnoFeatures>` in your `.csproj`)

`Uno.Extensions.Authentication` provides you with a consistent way to add authentication to your application. It is recommended to use one of the built-in `IAuthenticationService` implementations. This tutorial will use the custom authorization to validate user credentials.

## Step-by-step
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/Authentication/HowTo-Cookies.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ uid: Uno.Extensions.Authentication.HowToCookieAuthorization
---
# How-To: Using Cookies to Authorize

> **UnoFeatures:** `Authentication`, `AuthenticationMsal`, or `AuthenticationOidc` (add to `<UnoFeatures>` in your `.csproj`)

Using **cookies** is a common way to store tokens that are needed to authenticate a user. When an HTTP request is successfully authenticated, the server will return a response that creates a cookie containing a token value. Uno Extensions makes these cookie-related authorization steps less tedious by doing the work of extracting these values and applying them to future requests. This tutorial will teach you how to configure authentication to apply tokens from a cookie when they are available.

> [!IMPORTANT]
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/Authentication/HowTo-MsalAuthentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ uid: Uno.Extensions.Authentication.HowToMsalAuthentication
---
# How-To: Get Started with MSAL Authentication

> **UnoFeatures:** `AuthenticationMsal` (add to `<UnoFeatures>` in your `.csproj`)

`MsalAuthenticationProvider` allows your users to sign in using their Microsoft identities. It wraps the [MSAL library](https://github.com/AzureAD/microsoft-authentication-library-for-dotnet) from Microsoft into an implementation of `IAuthenticationProvider`. This tutorial will use MSAL authorization to validate user credentials.

## Step-by-step
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/Authentication/HowTo-OidcAuthentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ uid: Uno.Extensions.Authentication.HowToOidcAuthentication
---
# How-To: Get Started with Oidc Authentication

> **UnoFeatures:** `AuthenticationOidc` (add to `<UnoFeatures>` in your `.csproj`)

`OidcAuthenticationProvider` is a specific implementation of `IAuthenticationProvider` that allows your users to sign in using their identities from a participating identity provider. It provides seamless integration with any [OpenID Connect](https://openid.net/connect/) backend, such as [Duende.IdentityServer](https://duendesoftware.com/products/identityserver). By acting as an adapter, it integrates OpenID Connect authentication into the Uno.Extensions ecosystem, allowing you to leverage a unified approach across platforms.

Under the hood, `OidcAuthenticationProvider` relies on [Duende.IdentityModel.OidcClient](https://docs.duendesoftware.com/identitymodel-oidcclient/), for all non-windows targets, as a widely-used .NET library that handles the core OpenID Connect and OAuth 2.0 protocols. This library manages the complex operations like token handling and user authentication.
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/Authentication/HowTo-WebAuthentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ uid: Uno.Extensions.Authentication.HowToWebAuthentication
---
# How-To: Get Started with Web Authentication

> **UnoFeatures:** `Authentication` (add to `<UnoFeatures>` in your `.csproj`)

`WebAuthenticationProvider` provides an implementation that displays a web view in order for the user to login. After login, the web view redirects back to the application, along with any tokens. This tutorial will use web authorization to validate user credentials.

## Step-by-step
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/Configuration/ConfigurationOverview.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ uid: Uno.Extensions.Configuration.Overview
---
# Configuration

> **UnoFeatures:** `Configuration` (add to `<UnoFeatures>` in your `.csproj`)

`Uno.Extensions.Configuration` provides a uniform way to read or write configuration data from a number of distinct sources. The implementation of `IOptions<T>` from [Microsoft.Extensions.Options](https://learn.microsoft.com/dotnet/api/microsoft.extensions.options) allows for [read-only](https://learn.microsoft.com/dotnet/core/extensions/configuration#concepts-and-abstractions) access to values organized into **configuration sections**. The [writable configuration](xref:Uno.Extensions.Configuration.HowToWritableConfiguration) pattern supports the ability to update configuration values at runtime.

This feature uses [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration) for any configuration related work. For more documentation on configuration, read the references listed at the bottom.
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/Configuration/HowTo-Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ uid: Uno.Extensions.Configuration.HowToConfiguration
---
# How-To: Get Started with Configuration

> **UnoFeatures:** `Configuration` (add to `<UnoFeatures>` in your `.csproj`)

`Uno.Extensions.Configuration` provides you with a consistent way to view configuration data from a number of distinct sources. It leverages the `IOptions<T>` interface from [Microsoft.Extensions.Options](https://learn.microsoft.com/dotnet/api/microsoft.extensions.options) to offer [read-only](https://learn.microsoft.com/dotnet/core/extensions/configuration#concepts-and-abstractions) access to values organized into sections. Unlike the [Writable Configuration](xref:Uno.Extensions.Configuration.HowToWritableConfiguration) (aka Settings) pattern, this does not allow for programmatic writing by itself.

## Step-by-step
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/Configuration/HowTo-WritableConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ uid: Uno.Extensions.Configuration.HowToWritableConfiguration

# How-To: Writable Configuration

> **UnoFeatures:** `Configuration` (add to `<UnoFeatures>` in your `.csproj`)

**Writable Configuration** extends the standard, [read-only](xref:Uno.Extensions.Configuration.HowToConfiguration) pattern by allowing for programmatic writing of configuration values at runtime. This is useful for scenarios where you want to persist user preferences or other trivial information that may be changed over time. `Uno.Extensions.Configuration` extends the `IOptionsSnapshot<T>` interface from [Microsoft.Extensions.Options](https://learn.microsoft.com/dotnet/api/microsoft.extensions.options) to support this.

A special interface called `IWritableOptions<T>` is registered as a service when you use the `UseConfiguration()` extension method. In this tutorial, we will walk through how to use the `UpdateAsync()` method on this interface to modify values of a specific configuration section. For a refresher on configuration sections, see [Sections](xref:Uno.Extensions.Configuration.Overview#sections).
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/DependencyInjection/DependencyInjectionOverview.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ uid: Uno.Extensions.DependencyInjection.Overview

# Dependency Injection

> **UnoFeatures:** `Hosting` (add to `<UnoFeatures>` in your `.csproj`)

Apps built using hosting can leverage dependency injection (DI) to register services and make them available to app dependencies. This pattern enables apps to follow sound design principles, such as [SOLID](https://en.wikipedia.org/wiki/SOLID) and [Inversion of Control](https://en.wikipedia.org/wiki/Inversion_of_control). While the host builder implements standard functionality from the [Microsoft.Extensions.DependencyInjection](https://www.nuget.org/packages/Microsoft.Extensions.DependencyInjection) library, it also provides additional features to improve the developer experience.

## Registering Services
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/DependencyInjection/HowTo-CommunityToolkit.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ uid: Uno.Extensions.DependencyInjection.HowToCommunityToolkit

# How-To: Manually Resolving Dependencies with CommunityToolkit.Mvvm

> **UnoFeatures:** `Mvvm` (add to `<UnoFeatures>` in your `.csproj`)

While making gradual changes to an existing app's codebase, you may find it necessary to access the DI container to manually resolve dependencies. For instance, if you are overhauling a view model to separate its logic into services, you may need to resolve the service without using constructor injection. The [CommunityToolkit.Mvvm](https://www.nuget.org/packages/CommunityToolkit.Mvvm) package provides a static `Ioc.Default` property that exposes the DI container used by the application.

This tutorial will walk you through how to set up this feature and use it to manually resolve dependencies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ uid: Uno.Extensions.DependencyInjection.HowToDependencyInjection
---
# How-To: Use Services with Dependency Injection

> **UnoFeatures:** `Hosting` (add to `<UnoFeatures>` in your `.csproj`)

Dependency Injection (DI) is an important design pattern when building loosely-coupled software that allows for maintainability and testing. This tutorial will walk you through how to register services so that they can be consumed throughout your application.

## Step-by-step
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/Hosting/HostingOverview.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ uid: Uno.Extensions.Hosting.Overview
---
# Hosting

> **UnoFeatures:** `Hosting` (add to `<UnoFeatures>` in your `.csproj`)

`Hosting` provides an implementation of the abstraction for building applications which support initialization of dependencies, establishing different environment types, and the full breadth of extensible features offered by Uno.Extensions.

Hosting is provided as an Uno Feature. To enable `Hosting` support in your application, add `Hosting` to the `<UnoFeatures>` property in the Class Library (.csproj) file. For more information about `UnoFeatures` refer to our [Using the Uno.Sdk](xref:Uno.Features.Uno.Sdk) docs.
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/Hosting/HowTo-HostingSetup.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ uid: Uno.Extensions.Hosting.HowToHostingSetup
---
# How-To: Get Started with Hosting

> **UnoFeatures:** `Hosting` (add to `<UnoFeatures>` in your `.csproj`)

`Hosting` can be used to register services that will be accessible throughout the application via dependency injection (DI). This tutorial will walk you through the critical steps needed to leverage hosting in your application.

[!include[create-application](../includes/create-application.md)]
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/Http/HowTo-EndpointOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ uid: Uno.Extensions.Http.HowToEndpointOptions

# How-To: Configure `HttpClient` with Custom Endpoint Options

> **UnoFeatures:** `Http` (add to `<UnoFeatures>` in your `.csproj`)

It's often necessary to include an API key alongside requests to a web API. This can be done by adding a header to the request. The steps below will show you how to easily specify custom options, such as an access token, when adding an endpoint. You can then configure the associated `HttpClient` from these options.

## Pre-requisites
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/Http/HowTo-Http.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ uid: Uno.Extensions.Http.HowToHttp
---
# How-To: Register an Endpoint for HTTP Requests

> **UnoFeatures:** `Http` (add to `<UnoFeatures>` in your `.csproj`)

When working with a complex application, centralized registration of your API endpoints is a good practice. This allows you to easily change the endpoint for a given service, and to easily add new services.

## Step-by-step
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/Http/HowTo-Kiota.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ uid: Uno.Extensions.Http.HowToKiota
---
# How-To: Quickly create and register a Kiota Client for an API

> **UnoFeatures:** `HttpKiota` (add to `<UnoFeatures>` in your `.csproj`)

When working with APIs in your application, having a strongly-typed client can simplify communication and reduce boilerplate code. **Kiota** is a tool that generates strongly-typed API clients from Swagger/OpenAPI definitions. With Uno.Extensions, you can easily register and use Kiota clients in your Uno Platform app without additional setup.

## Step-by-Step Guide
Expand Down
4 changes: 3 additions & 1 deletion doc/Learn/Http/HowTo-Refit.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ uid: Uno.Extensions.Http.HowToRefit
---
# How-To: Quickly Create a Strongly-Typed REST Client for an API

> **UnoFeatures:** `HttpRefit` (add to `<UnoFeatures>` in your `.csproj`)

When accessing resources with a [REST-style](https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm) API is a significant part of your application, it is common to look for an SDK that provides a strongly-typed client for the API. This allows you to avoid writing boilerplate code to make requests and deserialize responses. There is sometimes no SDK available yet for the API you want to use, or it's not compatible with your target platform. With the design goal of avoiding boilerplate code in mind, we will walk through how to use [Refit](https://github.com/reactiveui/refit) to quickly create a strongly-typed client for a REST API and register it with the service collection as an endpoint.

## Step-by-step
Expand Down Expand Up @@ -41,7 +43,7 @@ When accessing resources with a [REST-style](https://www.ics.uci.edu/~fielding/p
}
```

* This feature requires the [Uno.Extensions.Http.WinUI](https://www.nuget.org/packages/Uno.Extensions.Http.WinUI) package. It uses [Microsoft Extensions](https://www.nuget.org/packages/Microsoft.Extensions.Http) for any HTTP-related [work](https://learn.microsoft.com/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests#benefits-of-using-ihttpclientfactory) such as naming or configuring the `HttpClient` instance associated with your endpoints.
* The HttpRefit UnoFeature automatically includes the `Uno.Extensions.Http.WinUI` package, which uses [Microsoft Extensions](https://www.nuget.org/packages/Microsoft.Extensions.Http) for any HTTP-related [work](https://learn.microsoft.com/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests#benefits-of-using-ihttpclientfactory) such as naming or configuring the `HttpClient` instance associated with your endpoints.

### 3. Define the live interface

Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/Http/HttpOverview.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ uid: Uno.Extensions.Http.Overview
---
# HTTP

> **UnoFeatures:** `Http`, `HttpRefit`, or `HttpKiota` (add to `<UnoFeatures>` in your `.csproj`)

Uno.Extensions.Http allows for the registration of API **endpoints** as multiple typed `HttpClient` instances. In this centralized location for accessing web resources, the lifecycle of the corresponding `HttpMessageHandler` objects is managed. Added clients can optionally be configured to use the platform-native handler. Additional functionality is provided to clear cookies or log diagnostic messages in responses. This library uses [Microsoft.Extensions.Http](https://www.nuget.org/packages/Microsoft.Extensions.Http) for any HTTP related work.

For additional documentation on HTTP requests, read the references listed at the bottom.
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/Localization/HowTo-Localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ uid: Uno.Extensions.Localization.HowToUseLocalization
---
# How-To: Configure and Use Localization

> **UnoFeatures:** `Localization` (add to `<UnoFeatures>` in your `.csproj`)

`Uno.Extensions.Localization` uses the locale-specific resources from `resw` files placed in folders corresponding to the well-known language tag (eg en-US). By opting into localization, an implementation of `IStringLocalizer` is registered with your application's `IServiceCollection`.

## Step-by-step
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/Localization/LocalizationOverview.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ uid: Uno.Extensions.Localization.Overview

# Localization

> **UnoFeatures:** `Localization` (add to `<UnoFeatures>` in your `.csproj`)

It is often necessary to adapt an application to a specific subset of users within a market. **Localization** includes the type of actions developers take to modify both user interface elements and content to adhere to more languages or cultures. Specifically, text **translation** is done by applying alternate strings of text at runtime which accommodate a user's language preference.

Many apps store these pieces of text in dedicated resource files that the app parses and assigns as text throughout the application. `Uno.Extensions.Localization` provides a consistent way to resolve the text of a specific culture or locale across platforms. This feature allows for modifying them to be applied upon app restart.
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/Logging/HowTo-InternalLogging.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ uid: Uno.Extensions.Logging.UseInternalLogging
---
# How-To: Enable Internal Logging Based on Your Hosting Environment

> **UnoFeatures:** `Logging` (add to `<UnoFeatures>` in your `.csproj`)

`Uno.Extensions.Logging` provides logging capabilities tailored to your target platform. It allows the recording of events for XAML layout, Uno-internal messages, and custom events with severity and verbosity levels of your choice.

## Step-by-step
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/Logging/HowTo-Logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ uid: Uno.Extensions.Logging.UseLogging
---
# How-To: Enable and Use Logging

> **UnoFeatures:** `Logging` (add to `<UnoFeatures>` in your `.csproj`)

`Uno.Extensions.Logging` allows you to leverage logging capabilities tailored to your target platform to easily record events for XAML layout, Uno-internal messages, and custom events with severity and verbosity levels of your choice.

## Step-by-step
Expand Down
2 changes: 2 additions & 0 deletions doc/Learn/Logging/LoggingOverview.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ uid: Uno.Extensions.Logging.Overview

# Logging

> **UnoFeatures:** `Logging` or `Serilog` (add to `<UnoFeatures>` in your `.csproj`)

Apps that record events typically do so for informational or diagnostic purposes, depending on the desired level of verbosity. **Logging** is the process of recording events to either a _persistent_ store such as a text file or database, or a _transient_ location like the standard output console. The `Uno.Extensions.Logging` library leverages logging capabilities tailored to the target platform to easily write entries for both app-specific and Uno internal events to one or more locations. These locations where logs can be written are referred to as **providers**. This feature enables a simple way to wire up custom log providers for locations not included by the runtime libraries or extensions.

It uses [Microsoft.Extensions.Logging](https://www.nuget.org/packages/Microsoft.Extensions.Logging) for logging abstractions. For more documentation about logging, read the references listed at the bottom.
Expand Down
Loading
Loading