// Add RCommon services
builder.Services.AddRCommon()
.WithClaimsAndPrincipalAccessor();
public class MyService
{
private readonly ICurrentUser _currentUser;
public MyService(ICurrentUser currentUser)
{
_currentUser = currentUser;
}
public void Foo()
{
Guid? userId = _currentUser.Id;
}
}