WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/29/2021 12:05:20 AM (3 months ago)
Author:
TimothyBlynJacobs
Message:

App Passwords: Introduce introspection endpoint.

This introduces a new endpoint, wp/v2/users/me/application-passwords/introspect, that will return details about the App Password being used to authenticate the current request. This allows for an application to disambiguate between multiple installations of their application which would all share the same app_id.

Props xkon, peterwilsoncc, TimothyBlynJacobs.
Fixes #52275.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r49992 r50065  
    281281add_action( 'auth_cookie_valid', 'rest_cookie_collect_status' );
    282282add_action( 'application_password_failed_authentication', 'rest_application_password_collect_status' );
    283 add_action( 'application_password_did_authenticate', 'rest_application_password_collect_status' );
     283add_action( 'application_password_did_authenticate', 'rest_application_password_collect_status', 10, 2 );
    284284add_filter( 'rest_authentication_errors', 'rest_application_password_check_errors', 90 );
    285285add_filter( 'rest_authentication_errors', 'rest_cookie_check_errors', 100 );
Note: See TracChangeset for help on using the changeset viewer.