
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
web-request-rpc
Advanced tools
JSON-RPC for Web Request Polyfills
The RPC protocol used in this library relies on the use of postMessage
and JSON-RPC. While it could potentially be made more general, it is
currently targeted at building components that help implement "Web Request"
polyfills.
A "Web request" is a catch all for a request made from a Web application (the relying party) that is fulfilled by another Web application (the service provider) that is typically from another origin. There are a number of different "Web requests" such as requests for payment, credentials, social information, or media. Each of these may have a Web API that is narrowly targeted (or includes specific features related to) at the specific type of request, however, each of them follow the same general model. This means some building blocks for creating polyfills for these sorts of "Web requests" can be shared.
Some of these building blocks are provided by this library.
A Client is used to connect to an RPC Server.
TODO
TODO:
A WebAppContext loads or attaches to a window with a remote Web Application that typically runs on a cross domain website. It is used to manage and provide access this RPC WebApp. It also enables the WebApp to make some control calls, such as to show or hide its UI.
Use cases include:
TODO: Add note about usefulness of passing a Promise for a window handle
when creating/connecting with client/server/WebAppContext/etc. This approach
enables a message listener to be attached prior to the creation of the
window where access to the window handle is not available until the window
has loaded. This is important to prevent missing messages.
A Web Application that uses RPC to communicate with a WebAppContext that is loaded by another, typically cross domain, website. This Web Application could be a "Web Request Mediator" that will itself load WebApps, or an application designed to fulfill Web requests.
FAQs
Web Request RPC
The npm package web-request-rpc receives a total of 1,804 weekly downloads. As such, web-request-rpc popularity was classified as popular.
We found that web-request-rpc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.