aspnetcore/client-ts/Microsoft.AspNetCore.Signal.../AuthorizedHub.cs

15 lines
489 B
C#

// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Authorization;
namespace Microsoft.AspNetCore.SignalR.Test.Server
{
[Authorize(JwtBearerDefaults.AuthenticationScheme)]
public class HubWithAuthorization : Hub
{
public string Echo(string message) => message;
}
}