In an older version of SignalR and .NetFreamwork i used the class inherit the class HubPipelineModule like :
public class IsConnectedPipeLine : HubPipelineModule
{
protected override bool OnBeforeIncoming(IHubIncomingInvokerContext context)
{
if (context.MethodDescriptor.Name == "GetToken")
return true;
return ChatIdentity.CheckToken(context.Hub.Context.GetCurrentUserToken());
}
}
Now i want to start developing in .NetCore 2.0 and SignalR 1.0.0 alpha 2 but I do not know how to implement pipe line, middleware or something like costum ActionAttribute in Web API controller, i do not care how, basically i need the OnBeforeIncoming functionality.
I searched and found only this article but it is very old and not for new versions.