GithubHelp home page GithubHelp logo

solid-contrib / monetization-tests Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 141 KB

Tests around https://github.com/solid/webmonetization

License: MIT License

Dockerfile 0.83% TypeScript 43.02% Shell 32.09% JavaScript 24.06%

monetization-tests's People

Contributors

michielbdejong avatar renovate-bot avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

monetization-tests's Issues

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.


  • Check this box to trigger a request for Renovate to run again on this repository

402 Payment Required

Similar to anyone logged in
we introduce "anyone who paid"; we'll need to pick a predicate similar to acl:AuthenticatedAgent, for instance acl:PayingAgent.

One test: 401 if you haven't authenticated at all and authenticating may help

  • If the current agent is not authenticated
  • Even if the ACL doc for a resource contains an authorization with acl:agentClass acl:PayingAgent
  • If there is at least one other authorization that would accept the request for some authenticated user
  • But based on just the other authorizations the request would be rejected for unauthenticated users

Then the server should give a 401 response like it normally would

One test: 402 if you haven't authenticated and paying is the only way in

  • If the current agent is not authenticated
  • And the ACL doc for a resource contains an authorization with acl:agentClass acl:PayingAgent
  • And there are no other authorization that would accept the request for any authenticated user
  • And the request would be rejected for unauthenticated users

Then the server should give a 402 response, along with a WWW-Pay header, for instance:

WWW-Pay: ilp-stream-webid realm=<realm>

Another test: 402 if you haven't paid

  • If the current agent is authenticated but didn't pay
  • And the ACL doc for a resource contains an authorization with acl:agentClass acl:PayingAgent
  • And based on that authorization the request would be accepted for authenticated users who paid
  • And based on just the other authorizations the request would be rejected for the current user

Then the server should give a 402 response, along with a WWW-Pay header, for instance:

WWW-Pay: ilp-stream-webid realm=<realm>

Another test: OK if paid

  • If the current agent is authenticated as a WebID who has already paid
  • And the ACL doc for a resource contains an authorization with acl:agentClass acl:PayingAgent
  • And based on that authorization the request would be accepted for authenticated users who paid

Then the server should give a 200 response

Vanity Payment Pointer at your pod domain

One test to add: Vanity Payment Pointer (no slash)

If for instance https://solidtestsuite.solidcommunity.net/profile/card contains a triple:

<#me> <http://paymentpointers.org/ns#PaymentPointer> "$example.com"

Then https://solidtestsuite.solidcommunity.net/.well-known/pay
Should redirect with a 302
to https://example.com/.well-known/pay

Another one: Vanity Payment Pointer (with slash)

If for instance https://solidtestsuite.solidcommunity.net/profile/card contains a triple:

<#me> <http://paymentpointers.org/ns#PaymentPointer> "$example.com/foo/bar"

Then https://solidtestsuite.solidcommunity.net/.well-known/pay
Should redirect with a 302
to https://example.com/foo/bar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.