Comments (4)
For the note, it's intended that you can't rely on ASP.NET Core authorization:
-
Authorization is technically a computation triggering either an exception or a regular flow. And if so, it has to be a part of Compute Services too - otherwise e.g. a permission change may not trigger the invalidation automatically.
-
There are a two main reasons ASP.NET Core Web API support was implemented in Fusion first:
- RESTful APIs are still the most popular ones, and the way Fusion "integrates" with ASP.NET Core implies you can call such APIs from both Fusion-aware and regular clients. In other words, this approach allows you to expose the RESTful API for any Fusion service ~ for free.
- Any externally callable service needs a robust argument validation, and ASP.NET Core provides one.
BUT it was always implied that at some later point more efficient protocols will be added, and thus we can't have any strong dependencies on whatever is available in ASP.NET Core.
This is why Fusion introduces its own Session
type, and even its own User
- if you do permission checks w/ Fusion, it's much better if such checks rely on Fusion-backed services too, so that changes related to authorization are applied instantly as well. Because if they aren't, you're risking to expose the old data that passed some permission checks once for indefinitely long period. Remember, Fusion "thinks" that any result stays the same unless it or one of its dependencies is invalidated!
from stl.fusion.
@Cooksauce yes, you're interpreting this correctly - which is why samples actually don't rely on ASP.NET Core authorization. You can use it in controllers, but you're totally right - when such values are updated, most likely the update requests will be routed via WebSocket channel. The only reason update may go through controller is when the client loses the computed value (i.e. client-side IComputed
describing the call gets garbage collected).
from stl.fusion.
@Cooksauce added a bit more details on that - hopefully this explains why it's done like this.
IMO it's not a compromise, btw - what's done is actually the most robust way to do this.
from stl.fusion.
Closing this issue - @Cooksauce please feel free to add more questions here or on Discord.
from stl.fusion.
Related Issues (20)
- Replace LogLevel / XxxLogLevel with IsLoggingEnabled everywhere
- Possible renames HOT 2
- Add System.Text.Json serializer support HOT 1
- Add MessagePack serializer support HOT 4
- Sign the assemblies that could be signed
- async alternate HOT 3
- [StateHasChangedAsync] System.NullReferenceException: 'Object reference not set to an instance of an object.' HOT 8
- infinite query loop HOT 7
- blazor wasm only (no server side blazor) can't get auth schemes HOT 3
- Exception when using together with Moq 4.18.1 HOT 9
- Don't mask HTTP errors in replica services HOT 1
- Improve test coverage
- A DateTime value was incorrectly passed to the server in Korean. HOT 2
- Commands are executed twice? HOT 3
- Could not load type 'Stl.Fusion.Bridge.IChannelProvider' from assembly 'Stl.Fusion
- Live sample at https://fusion-samples.servicetitan.com/ is broken in wasm mode HOT 2
- Assistance Needed: List Method Not Retrieving Values and Not Subscribing to Updates HOT 5
- Assistance/Improvement for Factories/Proxies using ActivatorUtilities HOT 7
- Stl.Interception gets trimmed away HOT 10
- Add Stl.Async-way of awaiting WaitHandle HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stl.fusion.