1
0
mirror of https://github.com/bitwarden/server synced 2026-01-06 02:23:51 +00:00
Files
server/src/Hub/SubjectUserIdProvider.cs
2018-08-02 12:14:33 -04:00

14 lines
314 B
C#

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