File tree Expand file tree Collapse file tree 1 file changed +0
-16
lines changed
src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/SignalR Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,6 @@ public partial class AppHub : Hub
2828
2929 public override async Task OnConnectedAsync ( )
3030 {
31- CheckClientAppVersion ( ) ;
32-
3331 if ( Context . GetHttpContext ( ) ? . ContainsExpiredAccessToken ( ) is true )
3432 throw new HubException ( nameof ( AppStrings . UnauthorizedException ) ) . WithData ( "ConnectionId" , Context . ConnectionId ) ;
3533
@@ -97,18 +95,4 @@ private async Task ChangeAuthenticationStateImplementation(ClaimsPrincipal? user
9795 await dbContext . UserSessions . Where ( us => us . SignalRConnectionId == Context . ConnectionId ) . ExecuteUpdateAsync ( us => us . SetProperty ( x => x . SignalRConnectionId , ( string ? ) null ) ) ;
9896 }
9997 }
100-
101- private void CheckClientAppVersion ( )
102- {
103- if ( Context . GetHttpContext ( ) ? . Request ? . Headers ? . TryGetValue ( "X-App-Version" , out var appVersionHeaderValue ) is true && appVersionHeaderValue . Any ( ) )
104- {
105- var appVersion = appVersionHeaderValue . Single ( ) ! ;
106- var appPlatformType = Enum . Parse < AppPlatformType > ( Context . GetHttpContext ( ) ! . Request . Headers [ "X-App-Platform" ] . Single ( ) ! ) ;
107- var minimumSupportedVersion = settings . SupportedAppVersions ! . GetMinimumSupportedAppVersion ( appPlatformType ) ;
108- if ( minimumSupportedVersion != null && Version . Parse ( appVersion ) < minimumSupportedVersion )
109- throw new HubException ( nameof ( AppStrings . ForceUpdateTitle ) )
110- . WithData ( "ClientAppVersion" , appVersion )
111- . WithData ( "ConnectionId" , Context . ConnectionId ) ;
112- }
113- }
11498}
You can’t perform that action at this time.
0 commit comments