Skip to content

Commit b4e0a12

Browse files
committed
remove advanced auth - not needed
1 parent afeb122 commit b4e0a12

1 file changed

Lines changed: 1 addition & 31 deletions

File tree

aspnetcore/migration/fx-to-core/areas/authentication.md

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ monikerRange: '>= aspnetcore-6.0'
77
ms.date: 11/9/2022
88
ms.topic: article
99
uid: migration/fx-to-core/areas/authentication
10+
zone_pivot_groups: migration-remote-app-setup
1011
---
1112

1213
# Migrate ASP.NET Framework Authentication to ASP.NET Core
@@ -220,37 +221,6 @@ public class HomeController : Controller
220221
}
221222
```
222223

223-
#### Advanced Configuration Options
224-
225-
In addition to the require boolean, an optional callback may be passed to `AddAuthenticationClient` to modify some other aspects of the remote authentication process's behavior:
226-
227-
* `RequestHeadersToForward`: This property contains headers that should be forwarded from a request when calling the authenticate API. By default, the only headers forwarded are `Authorization` and `Cookie`. Additional headers can be forwarded by adding them to this list. Alternatively, if the list is cleared (so that no headers are specified), then all headers will be forwarded. that no headers are specified), then all headers will be forwarded.
228-
* `ResponseHeadersToForward`: This property lists response headers that should be propagated back from the authenticate request to the original call that prompted authentication in scenarios where identity is challenged. By default, this includes `Location`, `Set-Cookie`, and `WWW-Authenticate` headers.
229-
* `AuthenticationEndpointPath`: The endpoint on the ASP.NET app where authenticate requests should be made. This defaults to `/systemweb-adapters/authenticate` and must match the endpoint specified in the ASP.NET authentication endpoint configuration.
230-
231-
Here's an example of configuring these options:
232-
233-
```csharp
234-
builder.Services.AddSystemWebAdapters()
235-
.AddRemoteAppClient(options =>
236-
{
237-
options.RemoteAppUrl = new Uri(builder.Configuration
238-
["ReverseProxy:Clusters:fallbackCluster:Destinations:fallbackApp:Address"]);
239-
options.ApiKey = builder.Configuration["RemoteAppApiKey"];
240-
})
241-
.AddAuthenticationClient(false, options =>
242-
{
243-
// Forward additional headers for authentication
244-
options.RequestHeadersToForward.Add("X-Custom-Auth-Header");
245-
246-
// Forward additional response headers
247-
options.ResponseHeadersToForward.Add("X-Custom-Response-Header");
248-
249-
// Use a custom authentication endpoint path
250-
options.AuthenticationEndpointPath = "/custom-auth-endpoint";
251-
});
252-
```
253-
254224
#### Implementing Custom Authentication Result Processors
255225

256226
You can implement custom processors to modify authentication results before they are used:

0 commit comments

Comments
 (0)