Hi,
Try:
public class MyHubFilter : IHubFilter
{
public async ValueTask<object?> InvokeMethodAsync(HubInvocationContext invocationContext, Func<HubInvocationContext, ValueTask<object?>> next)
{
var currentUser = invocationContext.ServiceProvider.GetRequiredService<ICurrentUser>();
if (!currentUser.IsAuthenticated || invocationContext.HubMethodName == "StartCircuit")
{
return await next.Invoke(invocationContext);
}
var args = invocationContext.HubMethodArguments.FirstOrDefault()?.ToString();
if (args != null && args.Contains("account/logout", StringComparison.InvariantCultureIgnoreCase))
{
return await next.Invoke(invocationContext);
}
var userAppService = invocationContext.ServiceProvider.GetRequiredService<IIdentityUserAppService>();
var user = await userAppService.GetAsync(currentUser.GetId());
// you can also use cache
if (claimToken != user.GetProperty(ConcurrentLoginConsts.ConcurrentLoginToken).ToString())
{
await invocationContext.Hub.Clients.Caller.SendAsync("JS.Error", "You have been logged out from another browser or tab. Please refresh this page.");
throw new AbpAuthorizationException();
}
return await next.Invoke(invocationContext);
}
}
Configure<HubOptions>(options =>
{
options.AddFilter<MyHubFilter>();
});
And
You can add the Volo.CmsKit.Pro.Public.*
packages
dotnet ef migrations upgrade_to_ABP7_4
command in the .EntityFrameworkCore
projectHi,
You can use the winmerge to compare them.
Does ABP plan to add these features for Blazor?
As I know, we have no plan to do it.
Is there anyway that I can use the backend of these features, the UI I will design and develop by myself.
Of course, you can create blazor components for them
Hi,
You should make sure the Kafka server is highly available.
When there is a problem with the connection it means there are serious problems with your application or Kafka server, and you must fix them. there is no other way.
Because the parameter name is not the same, you should make sure they are the same
we have a question regarding the ABP auto controller API, does it implement the service interface automatically in the controller or we should implement it ourselves?
You can check the document: https://docs.abp.io/en/abp/latest/API/Auto-API-Controllers
Hi,
No, Currently only MVC UI is available
Hi,
It looks like you are missing some database tables.
You can add new DB migration files and apply migration