mirror of
https://github.com/bitwarden/server
synced 2026-01-08 11:33:26 +00:00
stub out signalr sync hub
This commit is contained in:
13
src/Hub/SubjectUserIdProvider.cs
Normal file
13
src/Hub/SubjectUserIdProvider.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using IdentityModel;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
|
||||
namespace Bit.Hub
|
||||
{
|
||||
public class SubjectUserIdProvider : IUserIdProvider
|
||||
{
|
||||
public string GetUserId(HubConnectionContext connection)
|
||||
{
|
||||
return connection.User?.FindFirst(JwtClaimTypes.Subject)?.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user