mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 21:57:22 +01:00
Download rework (#22)
* rework server to send download ready back via signalr * adjust queue handling for removal * adjust api to main Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
This commit is contained in:
parent
5e0e21ef68
commit
4bd71a5889
15 changed files with 165 additions and 87 deletions
|
|
@ -0,0 +1,11 @@
|
|||
using Microsoft.AspNetCore.SignalR;
|
||||
|
||||
namespace MareSynchronosShared.Utils;
|
||||
|
||||
public class IdBasedUserIdProvider : IUserIdProvider
|
||||
{
|
||||
public string GetUserId(HubConnectionContext context)
|
||||
{
|
||||
return context.User!.Claims.SingleOrDefault(c => string.Equals(c.Type, MareClaimTypes.Uid, StringComparison.Ordinal))?.Value;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue