1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-07 05:58:13 -05:00
bitwarden/src/Notifications/SubjectUserIdProvider.cs
2022-08-29 16:06:55 -04:00

13 lines
294 B
C#

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;
}
}