WP Manifestindependent plugin directory
manifest / integrations / broker-server

WP Authentication Broker

Acts as a central broker for OAuth.

by wp-api · github.com/wp-api/broker-server

6stars
1forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/wp-api/broker-server/archive/refs/heads/master.zip

Readme

Broker Server

This repository contains the reference implementation for the Broker as specified in the Broker Authentication specification. This is currently running on the primary Broker installation at https://apps.wp-api.org/spec/

Running your own broker

You can run your own broker for a company app registry, internal use, or development purposes. Simply install this plugin on your site.

The plugin requires the OAuth Server to be installed and active. Technically speaking, the REST API plugin is not required, but is highly recommended.

Once installed, the broker needs to be registered on the sites it wants to work with, which requires the broker ID and broker verification URL. For your site, the broker ID is the home URL (home_url()) and the verification URL is /broker/verify/ on your site (home_url( '/broker/verify/' )). The broker ID can be changed via the authbroker.id filter.

To add your broker to the recognised brokers on a site, filter rest_broker_known_brokers and add it to the array:

add_filter( 'rest_broker_known_brokers', function ( $brokers ) {
    // 'id' => 'verify URL'
    $brokers['https://example.com/'] = 'https://example.com/broker/verify/';
    return $brokers;
});

Read the full README on GitHub →