sidecus / authzyin Goto Github PK
View Code? Open in Web Editor NEWasp.net core library and React library enables server & client policy based authorization by defining just once and code less
License: MIT License
asp.net core library and React library enables server & client policy based authorization by defining just once and code less
License: MIT License
This repo contains both a server library and a client library to share policy/requirement based authorization.
Certain users might only want to use the client library - for example the server stack might not be using asp.net core.
Providing an option for users to use the client library standalone will maximize the potential benefits.
One potential solution is to let user provide their AuthZyinContext object as part of the initializeAuthZyinContext call.
By default asp.net core serializes AuthZyinContext property names as camel case. To reuse the JSON path requirement definitions on the client, right now a brute force ToLowerCase is done on the client for each property name reference before the JSON path evaluation.
We should:
Now we are serializing all policies and their requirements to the client. If there are many policies the data can be big - there is unnecessary network bandwidth used when a lot of requirements are being reused in different policies.
It can be optimized by putting all requirement definitions to an array and use references to requirements (like an id) in the policy definitions.
It's low pri but can be a future enhancement.
I've been battling for a day with building this on both my Mac and PC due to this known npm issue.
After a day with no luck I decided to switch to yarn instead with this PR #6 .
If you have this repo before, this will cause an interruption to your local build after syncing the new commits.
Please make sure you install yarn and clean up the npm build related files first (please make sure you don't have any uncommitted changes):
npm install -g yarn
git clean -xdf
Then just F5 from VSCode or dotnet run
from the sample folder. I added custom dotnet build tasks to help with automatic yarn dependency restore and authzyin.js lib building in the same commit.
Right now the client lib is a bit harder to use - for example user is responsible for loading and saving the AuthZyinContext to some global state which can be used by the useAuthorize hooks.
We need to make it simpler.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.