Skip to content

Commit d490352

Browse files
authored
Update authn-and-authz.md
1 parent 0ba455c commit d490352

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

aspnetcore/signalr/authn-and-authz.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ uid: signalr/authn-and-authz
1515

1616
## Authenticate users connecting to a SignalR hub
1717

18-
:::moniker-end
19-
:::moniker range=">= aspnetcore-10.0"
20-
[!INCLUDE[](~/includes/api-endpoint-auth.md)]
21-
:::moniker-end
22-
:::moniker range=">= aspnetcore-6.0"
23-
2418
SignalR can be used with [ASP.NET Core authentication](xref:security/authentication/identity) to associate a user with each connection. In a hub, authentication data can be accessed from the <xref:Microsoft.AspNetCore.SignalR.HubConnectionContext.User?displayProperty=nameWithType> property. Authentication allows the hub to call methods on all connections associated with a user. For more information, see [Manage users and groups in SignalR](xref:signalr/groups). Multiple connections may be associated with a single user.
2519

2620
The following code is an example that uses SignalR and ASP.NET Core authentication:
@@ -36,6 +30,12 @@ In a browser-based app, cookie authentication allows existing user credentials t
3630

3731
Cookies are a browser-specific way to send access tokens, but non-browser clients can send them. When using the [.NET Client](xref:signalr/dotnet-client), the `Cookies` property can be configured in the `.WithUrl` call to provide a cookie. However, using cookie authentication from the .NET client requires the app to provide an API to exchange authentication data for a cookie.
3832

33+
:::moniker-end
34+
:::moniker range=">= aspnetcore-10.0"
35+
[!INCLUDE[](~/includes/api-endpoint-auth.md)]
36+
:::moniker-end
37+
:::moniker range=">= aspnetcore-6.0"
38+
3939
### Bearer token authentication
4040

4141
The client can provide an access token instead of using a cookie. The server validates the token and uses it to identify the user. This validation is done only when the connection is established. During the life of the connection, the server doesn't automatically revalidate to check for token revocation.

0 commit comments

Comments
 (0)