1
0
mirror of https://github.com/bitwarden/server synced 2025-12-24 04:03:25 +00:00
Files
server/src/Notifications/SubjectUserIdProvider.cs
2025-07-08 10:25:59 -04:00

16 lines
387 B
C#

// FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using IdentityModel;
using Microsoft.AspNetCore.SignalR;
namespace Bit.Notifications;
public class SubjectUserIdProvider : IUserIdProvider
{
public string GetUserId(HubConnectionContext connection)
{
return connection.User?.FindFirst(JwtClaimTypes.Subject)?.Value;
}
}