-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add hasPaid(agent) function to ACL check #1577
base: main
Are you sure you want to change the base?
Conversation
Linked to nodeSolidServer/acl-check#38 |
Now seeing: solid:ACL accessDenied: modeURIorReasons: ["User Unauthorized","Paying Would Help"] +0ms in the logs so that's good progress so far. |
I'm thinking the ACL checks are getting too complicated if we add this the way I originally thought we could. So instead:
|
Got an approximation now where if hasPaid was checked and it was empty, and the response otherwise is a 401 or a 403, then it becomes a 402. This is too often, because it could be that you pay to get more access, but then that access will still not be enough to do what you were trying to do. But it's a reasonable first approximation. I can now look at the integration of koa-ilp first, and the resolve this small inaccuracy last. |
Hm, seems that https://github.com/interledgerjs/ilp-fetch supports both psk2 and stream (ILP/STREAM being the newer one) but https://github.com/interledgerjs/koa-ilp/blob/master/index.js only does psk2 |
https://interledger.org/rfcs/0025-pre-shared-key-2/ even explicitly says PSK2 is deprecated. So that's no good, then. Will see if I can find some code that creates a |
Not sure how to add the |
https://expressjs.com/en/guide/error-handling.html seems relevant. |
This was because I hadn't npm-linked to the corresponding PR on acl-check. All good. |
It's now making the call to the oracle and checking if the response body equals 'ok'. |
This PR goes together with nodeSolidServer/acl-check#38 and https://github.com/solid/monetization-tests/blob/main/run-against-nss.sh |
No description provided.