1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-06 03:00:36 -05:00
bitwarden/src/Notifications/SubjectUserIdProvider.cs
2018-08-16 13:45:31 -04:00

14 lines
324 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;
}
}
}