Activities of "dave_scobie"

ABP Framework version: v6.0.1 UI type: BlazorServer DB provider: EF Core Tiered & Identity Server Separated

Issue: when setting up the BlazorServerApp to use Azure SignalR Service, the permissions work when logged in to show menus and permissions for navigation. On navigating to a page within Blazor, the API is called and "NO BEARER TOKEN" is presented in the API request when Azure SignalR Service has been configured in the BlazorStartupModule - shown below. When Azure SignalR Service is removed from the configuration, the Bearer Token is added to the every request to the API.

Configuration to reproduce of BlazorStartupModule:

context.Services.AddSignalR(options => { options.AddFilter<AbpSignalRFilter>(); options.EnableDetailedErrors = true; }).AddAzureSignalR(options => { options.ServerStickyMode = Microsoft.Azure.SignalR.ServerStickyMode.Required; });

The AbpSignalRFilter.cs

public class AbpSignalRFilter : IHubFilter
{   
    public async ValueTask<object> InvokeMethodAsync(HubInvocationContext invocationContext, Func<HubInvocationContext, ValueTask<object>> next)
    {
        var currentPrincipalAccessor = invocationContext.ServiceProvider.GetRequiredService<ICurrentPrincipalAccessor>();
        
        using (currentPrincipalAccessor.Change(invocationContext.Context.User))
        {
                return await next(invocationContext);
        }
    }
    public virtual async Task OnConnectedAsync(HubLifetimeContext context, Func<HubLifetimeContext, Task> next)
    {
        var currentPrincipalAccessor = context.ServiceProvider.GetRequiredService<ICurrentPrincipalAccessor>();
        using (currentPrincipalAccessor.Change(context.Context.User))
        {
            await next(context);
        }
    }
    public virtual async Task OnDisconnectedAsync(HubLifetimeContext context, Exception exception, Func<HubLifetimeContext, Exception, Task> next)
    {
        var currentPrincipalAccessor = context.ServiceProvider.GetRequiredService<ICurrentPrincipalAccessor>();
        using (currentPrincipalAccessor.Change(context.Context.User))
        {
            await next(context, exception);
        }
    }
}

On running application no bearer token present when calling API and we get a 401 message from the API, the Azure SignalR connection is the then disconnected.

Please confirm why when using the Azsure SignalR Service the bearer token is not being provided and what we need to implement to get this to work.

Hi

We are having an issue with Implementing Microsoft Identity into a Blazor project that currently uses ABP separate server for managing resources.

We are struggling to get User Role/Permission management to work with external login provider and need support.

Thanks

Dave

Hi There we are having real difficult implementing a working solution to enable users to logon using Microsoft Identity (SSO) and then hook that up with the identity server to link roles/permissions.

Do you have any working examples, if not how do we validate the SSO back with identity server to authenticate.

Please can you arrange a call with us to go through.

Dave

Showing 1 to 3 of 3 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on December 26, 2024, 06:07