Skip to content

Commit 8a84eff

Browse files
Update READMEs for Duende.BFF.Blazor packages
Renamed BFF.Blazor and BFF.Blazor.Client to Duende.BFF.Blazor and Duende.BFF.Blazor.Client, respectively, in the READMEs. Added detailed descriptions, features, installation steps, usage examples, licensing information, and links to documentation and support resources.
1 parent c587eb5 commit 8a84eff

File tree

2 files changed

+152
-2
lines changed

2 files changed

+152
-2
lines changed

bff/src/Bff.Blazor.Client/README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,37 @@
1-
# BFF.Blazor.Client
1+
# Duende.BFF.Blazor.Client
2+
3+
The `Duende.BFF.Blazor.Client` package provides integration between Blazor WebAssembly applications and the Backend for
4+
Frontend (BFF) security architecture. It enables secure communication between Blazor WASM clients and BFF hosts by
5+
handling authentication, session management, and API access.
6+
7+
## Features
8+
9+
* Seamless integration with Blazor WebAssembly applications
10+
* Automatic handling of BFF authentication and session management
11+
* Built-in support for secure API calls through the BFF host
12+
* Integration with standard Blazor authentication state providers
13+
* Support for both interactive and silent token refresh
14+
* Automatic handling of session expiration and logout
15+
16+
## Getting Started
17+
18+
For detailed documentation and examples, please visit
19+
the [Duende BFF documentation](https://docs.duendesoftware.com/bff/).
20+
21+
## Licensing
22+
23+
Duende.BFF.Blazor.Client is source-available, but requires a paid license for production use.
24+
25+
- **Development and Testing**: You are free to use and explore the code for development, testing, or personal projects
26+
without a license.
27+
- **Production**: A license is required for production environments.
28+
- **Free Community Edition**: A free Community Edition license is available for qualifying companies and non-profit
29+
organizations.
30+
31+
By accessing the Duende Products code here, you are agreeing to
32+
the [licensing terms](https://duendesoftware.com/license).
33+
34+
## Reporting Issues and Getting Support
35+
36+
- For bug reports or feature requests, [use our developer community forum](https://github.com/DuendeSoftware/community)
37+
- For security-related concerns, please contact us privately at: **[email protected]**

bff/src/Bff.Blazor/README.md

Lines changed: 115 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,115 @@
1-
# BFF.Blazor
1+
# Duende.BFF.Blazor
2+
3+
[![NuGet](https://img.shields.io/nuget/v/Duende.BFF.Blazor.svg)](https://www.nuget.org/packages/BFF.Blazor)
4+
5+
`Duende.BFF.Blazor` is a specialized .NET library designed to support secure browser-based applications, mainly using the Backend for Frontend (BFF) pattern in combination with Blazor Server, Blazor WASM (WebAssembly), and SPA frontends.
6+
7+
It facilitates simpler and safer implementations of OpenID Connect (OIDC) and OAuth2 flows by moving token handling and other protocol interactions to the server.
8+
9+
[Learn more about the BFF pattern](https://docs.duendesoftware.com/bff/).
10+
11+
---
12+
13+
## Features
14+
15+
- **Token Management**: Provides server-side storage and handling of access tokens, improving security by removing tokens from the browser.
16+
- **Seamless Integration With Blazor**: Easily integrates with Blazor Server or Blazor WASM applications, streamlining authentication functionalities.
17+
- **Customizable Security**: Includes extension points to customize claims transformation, authentication logic, and session management.
18+
- **Supports Modern OAuth2 and OIDC Flows**: Works around browser privacy restrictions affecting OAuth/OIDC protocols.
19+
- **Proxies for Secure API Access**: Enables secure API calls via the server to prevent token exposure to the client.
20+
21+
---
22+
23+
## Getting Started
24+
25+
To get started with **Duende.BFF.Blazor**, follow these steps:
26+
27+
### Installation via NuGet
28+
29+
You can install the library via NuGet:
30+
31+
```bash
32+
dotnet add package Duende.BFF.Blazor
33+
```
34+
35+
### Dependencies
36+
37+
Ensure your project targets **.NET 8.0 or higher** and references ASP.NET Core for Blazor development.
38+
39+
This library also integrates seamlessly with [Duende IdentityServer](https://duendesoftware.com/products/identityserver) or other compliant providers for OIDC and OAuth2.
40+
41+
---
42+
43+
## Usage
44+
45+
### Quick Example
46+
47+
1. **Configure Services**
48+
Add the necessary services in your `Startup.cs` or `Program.cs`:
49+
50+
```csharp
51+
builder.Services.AddBff()
52+
.AddBlazorBffServer()
53+
.AddServerSideManagementClaims();
54+
```
55+
56+
2. **Update Middleware Pipeline**
57+
Update your app's middleware pipeline to include BFF features:
58+
59+
```csharp
60+
app.UseRouting();
61+
app.UseAuthentication();
62+
app.UseBff();
63+
app.UseAuthorization();
64+
65+
app.MapBffManagementApis();
66+
app.MapControllers();
67+
```
68+
69+
3. **Secure API Endpoints**
70+
Secure your API endpoints using the `[Authorize]` attribute to ensure they adhere to authentication and authorization policies.
71+
72+
```csharp
73+
[Authorize]
74+
[HttpGet("/api/secure-data")]
75+
public IActionResult GetSecureData()
76+
{
77+
return Ok(new { Message = "Secure data accessed" });
78+
}
79+
```
80+
81+
4. **Integrate with Blazor Components**
82+
Use `AuthenticationStateProvider` or other related services to manage authentication state within your Blazor components.
83+
84+
## Documentation
85+
86+
Extensive documentation is available to guide you through key concepts, setup details, and advanced configuration options:
87+
88+
- [API Documentation](https://docs.duendesoftware.com/bff/fundamentals/)
89+
- [Blazor Integration Guide](https://docs.duendesoftware.com/bff/fundamentals/blazor/)
90+
91+
## Related Projects
92+
93+
- [Duende.IdentityServer](https://github.com/DuendeSoftware/products) - Standards-compliant OpenID Connect and OAuth 2.0 framework.
94+
- [BFF.YARP](https://www.nuget.org/packages/Duende.BFF.Yarp) - BFF integration with YARP for reverse proxying.
95+
96+
## Licensing
97+
98+
**BFF.Blazor** is source-available, but requires a paid license for production use:
99+
100+
- **Development and Testing**: Free to use and explore for personal or development purposes.
101+
- **Production Use**: A commercial license is required. Visit [Duende Licensing](https://duendesoftware.com/license) for details.
102+
- **Community Edition**: A free Community Edition license is available for qualifying organizations. Learn more [here](https://duendesoftware.com/products/communityedition).
103+
104+
By using **Duende.BFF.Blazor**, you agree to abide by its [licensing terms](https://duendesoftware.com/license).
105+
106+
## Contributing
107+
108+
We welcome community contributions. Please refer to our [contributing guidelines](https://github.com/YourGitHub/bff-blazor/blob/main/CONTRIBUTING.md) for more information.
109+
110+
## Support and Issues
111+
112+
- **Report Issues**: Use [GitHub Issues](https://github.com/duendesoftware/products/issues) for bugs and feature requests.
113+
- **Security Concerns**: For security-related inquiries, contact **[email protected]**.
114+
- **Community Discussions**: Join our [developer forum](https://github.com/duendesoftware/community).
115+

0 commit comments

Comments
 (0)