mirror of
https://github.com/bitwarden/server
synced 2025-12-24 04:03:25 +00:00
16 lines
387 B
C#
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;
|
|
}
|
|
}
|