Make WordPress Core


Ignore:
Timestamp:
10/22/2020 03:04:23 PM (4 years ago)
Author:
TimothyBlynJacobs
Message:

App Passwords: Support an app_id to uniquely identify instances of an app.

Apps may now optionally include an app_id parameter when directing the user to the Authorize Application screen. This allows for instances of an application to be identified and potentially revoked or blocked.

Props TimothyBlynJacobs, georgestephanis.
Fixes #51583.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/user.php

    r49197 r49276  
    605605 *
    606606 *     @type string $app_name    The suggested name of the application.
     607 *     @type string $app_id      A uuid provided by the application to uniquely identify it.
    607608 *     @type string $success_url The url the user will be redirected to after approving the application.
    608609 *     @type string $reject_url  The url the user will be redirected to after rejecting the application.
     
    636637    }
    637638
     639    if ( ! empty( $request['app_id'] ) && ! wp_is_uuid( $request['app_id'] ) ) {
     640        $error->add(
     641            'invalid_app_id',
     642            __( 'The app id must be a uuid.' )
     643        );
     644    }
     645
    638646    /**
    639647     * Fires before application password errors are returned.
Note: See TracChangeset for help on using the changeset viewer.