Blazor WebAssembly with IdentityServer and remote data portal. #1740
-
I have a Blazor WebAssembly app using Identity Server that connects to a remote DataPortal (i.e. the DataPortal is running under a different web application from the Blazor CoreHosted application). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
CSLA doesn't generally manage the user principal itself, it relies on the underlying .NET platform to handle it. How .NET handles the principal is different per-platform. The The data portal, when in remote mode, defaults to serializing the principal from the calling process (client-side) to the server-side data portal. This can be turned off if you are doing your own impersonation, or allowing the underlying platform (like Windows) to do that work. I'm providing this background to help tease apart what's necessary here. Your client-side Blazor app typically needs the user principal/identity so it can run local role-based authorization rules. And it sounds like you do have the principal set in the client app right? By default, every time the client invokes the data portal server, the data portal will flow the client principal to the server. You have disabled this via You have two choices. Either remove the |
Beta Was this translation helpful? Give feedback.
Hi @DuncanSpence
CSLA doesn't generally manage the user principal itself, it relies on the underlying .NET platform to handle it. How .NET handles the principal is different per-platform. The
Csla.ApplicationContext.User
value adapts per-platform to abstract whatever .NET is doing in WPF, WinForms, aspnetcore, Blazor, etc.The data portal, when in remote mode, defaults to serializing the principal from the calling process (client-side) to the server-side data portal. This can be turned off if you are doing your own impersonation, or allowing the underlying platform (like Windows) to do that work.
I'm providing this background to help tease apart what's necessary here.
Your client-side Bla…