Skip to content

Commit 901281f

Browse files
committed
BFF API surface fixes
1 parent ed2921b commit 901281f

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

src/content/docs/bff/extensibility/tokens.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Implementations of the *IAccessTokenRetriever* can be added to endpoints when th
112112
```cs
113113
app.MapRemoteBffApiEndpoint(
114114
"/api/impersonation",
115-
"https://api.example.com/endpoint/requiring/impersonation"
115+
new Uri("https://api.example.com/endpoint/requiring/impersonation")
116116
).WithAccessToken(RequiredTokenType.User)
117117
.WithAccessTokenRetriever<ImpersonationAccessTokenRetriever>();
118118
```

src/content/docs/bff/fundamentals/apis/remote.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The `MapRemoteBffApiEndpoint` extension method maps a path and all sub-paths bel
4343

4444
```csharp
4545
// Program.cs
46-
app.MapRemoteBffApiEndpoint("/api/users", "https://remoteHost/users")
46+
app.MapRemoteBffApiEndpoint("/api/users", new Uri("https://remoteHost/users"))
4747
.WithAccessToken(RequiredTokenType.User);
4848
```
4949

src/content/docs/bff/fundamentals/blazor/rendering-modes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ This diagram shows this in more detail:
9999
```csharp
100100
// setup on the server
101101
102-
app.MapRemoteBffApiEndpoint("/remote-apis/user-token", "https://localhost:5010")
102+
app.MapRemoteBffApiEndpoint("/remote-apis/user-token", new Uri("https://localhost:5010"))
103103

104104
builder.Services.AddUserAccessTokenHttpClient("callApi",
105105
configureClient: client => client.BaseAddress = new Uri("https://localhost:5010/"));

src/content/docs/bff/getting-started/single-frontend.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ dotnet add package Duende.BFF.Yarp
232232
```
233233

234234
{/* prettier-ignore */}
235-
<Tabs syncKey="bffVersion">
235+
<Tabs>
236236
{/* prettier-ignore */}
237237
<TabItem label="Direct forwarding">
238238

@@ -243,7 +243,7 @@ dotnet add package Duende.BFF.Yarp
243243
// ...
244244
245245
// Map any call (including child routes) from /api/remote to https://remote-api-address
246-
app.MapRemoteBffApiEndpoint("/api/remote", "https://remote-api-address")
246+
app.MapRemoteBffApiEndpoint("/api/remote", new Uri("https://remote-api-address"))
247247
.WithAccessToken(RequiredTokenType.Client);
248248
```
249249

src/content/docs/bff/upgrading/bff-v3-to-v4.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,17 @@ The syntax for configuring remote APIs has changed slightly:
3030

3131
```diff lang="csharp" title="Program.cs"
3232
// Use a client credentials token
33-
app.MapRemoteBffApiEndpoint("/api/client-token", "https://localhost:5010")
33+
- app.MapRemoteBffApiEndpoint("/api/client-token", "https://localhost:5010")
3434
- .RequireAccessToken(TokenType.Client);
35+
36+
+ app.MapRemoteBffApiEndpoint("/api/client-token", new Uri("https://localhost:5010"))
3537
+ .WithAccessToken(RequiredTokenType.Client);
3638

3739
// Use the client token only if the user is logged in
38-
app.MapRemoteBffApiEndpoint("/api/optional-user-token", "https://localhost:5010")
40+
- app.MapRemoteBffApiEndpoint("/api/optional-user-token", "https://localhost:5010")
3941
- .WithOptionalUserAccessToken();
42+
43+
+ app.MapRemoteBffApiEndpoint("/api/optional-user-token", new Uri("https://localhost:5010"))
4044
+ .WithAccessToken(RequiredTokenType.UserOrNone);
4145
```
4246

src/content/docs/identityserver/quickstarts/javascript-clients/js-with-backend.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ API in the ASP.NET Core routing system. Add the code below to the endpoint confi
463463
app.MapGet("/local/identity", LocalIdentityHandler)
464464
.AsBffApiEndpoint();
465465

466-
app.MapRemoteBffApiEndpoint("/remote", "https://localhost:6001")
466+
app.MapRemoteBffApiEndpoint("/remote", new Uri("https://localhost:6001"))
467467
.WithAccessToken(Duende.Bff.AccessTokenManagement.RequiredTokenType.User);
468468
```
469469

0 commit comments

Comments
 (0)