You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/bff/fundamentals/apis/local.mdx
+38-36Lines changed: 38 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,57 +98,59 @@ Additionally, API endpoints should handle scenarios where the session has expire
98
98
99
99
Duende.BFF can automate the pre-processing step of requiring the custom anti-forgery header. To do so, first add the BFF middleware to the pipeline, and then decorate your endpoints to indicate that they should receive BFF pre-processing.
100
100
101
+
{/* prettier-ignore */}
101
102
<Steps>
102
103
103
-
1.**Add Middleware to the pipeline**
104
+
1.**Add Middleware to the pipeline**
104
105
105
-
Add the BFF middleware to the pipeline by calling `UseBff`. Note that the middleware must be placed before the authorization middleware, but after routing.
106
+
Add the BFF middleware to the pipeline by calling `UseBff`. Note that the middleware must be placed before the authorization middleware, but after routing.
106
107
107
-
```csharp {5}
108
-
// Program.cs
109
-
app.UseAuthentication();
110
-
app.UseRouting();
108
+
```csharp {5}
109
+
// Program.cs
110
+
app.UseAuthentication();
111
+
app.UseRouting();
111
112
112
-
app.UseBff();
113
+
app.UseBff();
113
114
114
-
app.UseAuthorization();
115
+
app.UseAuthorization();
115
116
116
-
// map endpoints
117
-
```
117
+
// map endpoints
118
+
```
118
119
119
-
2.**Decorate Endpoints**
120
+
2.**Decorate Endpoints**
120
121
121
-
Endpoints that require the pre- and post-processing described above must be decorated with a call to `AsBffApiEndpoint()`.
122
+
Endpoints that require the pre- and post-processing described above must be decorated with a call to `AsBffApiEndpoint()`.
122
123
123
-
For Minimal API endpoints, you can apply BFF pre- and post-processing when they are mapped.
124
+
For Minimal API endpoints, you can apply BFF pre- and post-processing when they are mapped.
124
125
125
-
```csharp {4-5}
126
-
app.MapPost("/foo", context=> {
127
-
// ...
128
-
})
129
-
.RequireAuthorization() // no anonymous access
130
-
.AsBffApiEndpoint(); // BFF pre/post processing
131
-
```
126
+
```csharp {4-5}
127
+
app.MapPost("/foo", context=> {
128
+
// ...
129
+
})
130
+
.RequireAuthorization() // no anonymous access
131
+
.AsBffApiEndpoint(); // BFF pre/post processing
132
+
```
132
133
133
-
For MVC controllers, you can similarly apply BFF pre- and post-processing to controller actions when they are mapped.
134
+
For MVC controllers, you can similarly apply BFF pre- and post-processing to controller actions when they are mapped.
134
135
135
-
```csharp {2-3}
136
-
app.MapControllers()
137
-
.RequireAuthorization() // no anonymous access
138
-
.AsBffApiEndpoint(); // BFF pre/post processing
139
-
```
136
+
```csharp {2-3}
137
+
app.MapControllers()
138
+
.RequireAuthorization() // no anonymous access
139
+
.AsBffApiEndpoint(); // BFF pre/post processing
140
+
```
140
141
141
-
Alternatively, you can apply the `[BffApi]` attribute directly to the controller or action.
142
+
Alternatively, you can apply the `[BffApi]` attribute directly to the controller or action.
Copy file name to clipboardExpand all lines: src/content/docs/bff/upgrading/bff-v2-to-v3.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
---
2
2
title: "Duende BFF Security Framework v2.x to v3.0"
3
3
description: Guide for upgrading Duende BFF Security Framework from version 2.x to version 3.0, including migration steps for custom implementations and breaking changes.
Copy file name to clipboardExpand all lines: src/content/docs/identityserver/upgrades/identityserver4-to-duende-identityserver-v7.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ IdentityServer4 reached its end of life (EOL) on December 13, 2022. It is strong
15
15
Depending on your current version of IdentityServer4, different steps may be required.
16
16
You can determine the version of IdentityServer4 by running the `dotnet list` command at the root of your IdentityServer host project, or using NuGet tooling in Visual Studio or JetBrains Rider.
17
17
18
+
{/* prettier-ignore */}
18
19
<Tabs>
19
20
<TabItemlabel="Windows">
20
21
<Code
@@ -164,6 +165,7 @@ Make sure to verify the database migrations as part of your IdentityServer4 upgr
164
165
165
166
For the operational data, you can create and apply an Entity Framework Core migration that targets the `PersistedGrantDbContext` database context.
166
167
168
+
{/* prettier-ignore */}
167
169
<Steps>
168
170
169
171
1. Create the migration:
@@ -183,6 +185,7 @@ For the operational data, you can create and apply an Entity Framework Core migr
183
185
For your configuration data, the conversation from the old schema to the new will need to be performed by applying a custom SQL script.
184
186
We'll start with creating a migration that targets the `ConfigurationDbContext` database context:
185
187
188
+
{/* prettier-ignore */}
186
189
<Steps>
187
190
188
191
1. Create the migration:
@@ -416,6 +419,7 @@ In this section, we'll look at updating the database schema based on the stores
416
419
You'll need to create two database migrations that update the database schema: one that targets the `PersistedGrantDbContext` (for operational data), and one that targets the `ConfigurationDbContext` (for configuration data).
417
420
Note that you may want to change the database migration paths in the examples below to match your project structure.
418
421
422
+
{/* prettier-ignore */}
419
423
<Steps>
420
424
421
425
1. Create the migrations for the operational and configuration database context:
0 commit comments