KNowledgeOnWebScale / solid-authentication-browser-extension

10 stars 1 forks source link

Allow authentication on POST requests #14

Open axellorreyne opened 1 year ago

axellorreyne commented 1 year ago

At this time, the extension will only add authentication to GET requests. POST requests will not be blocked, but won't have any authentication either.

This is because, the (blocking) web request listener that catches any outgoing request from the browser user, will catch any outgoing requests from the extension background script as well, specifically POST request requesting the token url and requesting access tokens from said url.

To prevent an infinite loop of blocking web request listeners catching each other, any POST request that is caught, will be passed before any token url or access token is requested, and consequently any authentication is added.

A more elegant way of catching and passing these two specific requests should be implemented, so that user POST requests can also be authenticated without creating an infinite loop.