- Notifications
You must be signed in to change notification settings - Fork 305
Add hasPaid(agent) function to ACL check#1577
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
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Conversation
michielbdejong commented Mar 3, 2021
Linked to nodeSolidServer/acl-check#38 |
michielbdejong commented Mar 3, 2021
Now seeing: solid:ACL accessDenied: modeURIorReasons: ["User Unauthorized","Paying Would Help"] +0msin the logs so that's good progress so far. |
michielbdejong commented Mar 8, 2021
I'm thinking the ACL checks are getting too complicated if we add this the way I originally thought we could. So instead:
|
michielbdejong commented Mar 8, 2021
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. |
michielbdejong commented Mar 8, 2021
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 |
michielbdejong commented Mar 8, 2021
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 |
michielbdejong commented Mar 8, 2021
Not sure how to add the |
michielbdejong commented Mar 8, 2021
https://expressjs.com/en/guide/error-handling.html seems relevant. |
michielbdejong commented Aug 31, 2021 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
This was because I hadn't npm-linked to the corresponding PR on acl-check. All good. |
michielbdejong commented Sep 2, 2021
It's now making the call to the oracle and checking if the response body equals 'ok'. |
michielbdejong commented Sep 2, 2021 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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.