Make WordPress Core

10/08/2020 10:12:02 PM (4 years ago)

REST API: Introduce Application Passwords for API authentication.

In WordPress 4.4 the REST API was first introduced. A few releases later in WordPress 4.7, the Content API endpoints were added, paving the way for Gutenberg and countless in-site experiences. In the intervening years, numerous plugins have built on top of the REST API. Many developers shared a common frustration, the lack of external authentication to the REST API.

This commit introduces Application Passwords to allow users to connect to external applications to their WordPress website. Users can generate individual passwords for each application, allowing for easy revocation and activity monitoring. An authorization flow is introduced to make the connection flow simple for users and application developers.

Application Passwords uses Basic Authentication, and by default is only available over an SSL connection.

Props georgestephanis, kasparsd, timothyblynjacobs, afercia, akkspro, andraganescu, arippberger, aristath, austyfrosty, ayesh, batmoo, bradyvercher, brianhenryie, helen, ipstenu, jeffmatson, jeffpaul, joostdevalk, joshlevinson, kadamwhite, kjbenk, koke, michael-arestad, Otto42, pekz0r, salzano, spacedmonkey, valendesigns.
Fixes #42790.

1 edited


  • trunk/src/wp-settings.php

    r49103 r49109  
    237237require ABSPATH . WPINC . '/nav-menu-template.php';
    238238require ABSPATH . WPINC . '/admin-bar.php';
     239require ABSPATH . WPINC . '/class-wp-application-passwords.php';
    239240require ABSPATH . WPINC . '/rest-api.php';
    240241require ABSPATH . WPINC . '/rest-api/class-wp-rest-server.php';
    260261require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-plugins-controller.php';
    261262require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-directory-controller.php';
     263require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-application-passwords-controller.php';
    262264require ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-meta-fields.php';
    263265require ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-comment-meta-fields.php';
Note: See TracChangeset for help on using the changeset viewer.