SignalR - OnConnect() authorization - how to disconnect unauthorized user? -
in hub, have (pseudocode):
public override task onconnected() { var islegal = authorize(); if (!islegal) //not authorized { //how deny him connection? } return base.onconnected(); }
how disconnect/deny connection user?
add authorize attribute on class,the user denied, if not authenticated.
Comments
Post a Comment