1
0
mirror of https://github.com/bitwarden/server synced 2025-12-24 04:03:25 +00:00
Files
server/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;
}
}
}