wordpress-develop/tests/phpunit/tests
TimothyBlynJacobs 1856d0fe2a 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@49109 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-08 22:12:02 +00:00
..
actions Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
admin REST API: Introduce Application Passwords for API authentication. 2020-10-08 22:12:02 +00:00
ajax Tests: Require imagejpeg() function in Ajax media editing tests. 2020-09-29 14:14:28 +00:00
attachment Coding Standards: Give the $id variable in slashed data tests a more descriptive name. 2020-09-19 10:53:15 +00:00
blocks Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
bookmark Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
canonical Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
category Menus: In Walker_Nav_Menu, Walker_Category, and Walker_Page, properly output link attributes having a legitimate "empty" value, for example an HTML data attribute with a value of zero (0). 2019-10-06 15:04:18 +00:00
comment Tests: Speed up slashed data tests by reusing some more shared fixtures. 2020-09-19 11:11:00 +00:00
customize General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:13:57 +00:00
date Tests: Add a polyfill for assertEqualsWithDelta() to WP_UnitTestCase and use it where appropriate. 2020-09-07 03:12:17 +00:00
db Tests: Use consistent trailing punctuation in markTestSkipped() messages. 2020-09-21 14:05:23 +00:00
dependencies Update jQuery step two: 2020-10-07 16:31:53 +00:00
editor Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
error-protection Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
external-http Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
feed Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
filesystem Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
formatting Tests: Consistently use the expectException() method instead of the older @expectedException annotation. 2020-09-18 13:22:22 +00:00
functions Add ircs and irc6 to the list of allowed protocols. 2020-09-26 21:00:19 +00:00
general Tests: Replace a few more instances of assertEquals() with assertSame(). 2020-09-04 07:36:33 +00:00
hooks Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
http Tests: Use consistent trailing punctuation in fail() messages. 2020-09-22 12:32:39 +00:00
image General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:13:57 +00:00
import Tests: Use consistent trailing punctuation in fail() messages. 2020-09-22 12:32:39 +00:00
includes Tests: Consistently use the expectException() method instead of the older @expectedException annotation. 2020-09-18 13:22:22 +00:00
l10n Tests: Use consistent trailing punctuation in markTestSkipped() messages. 2020-09-21 14:05:23 +00:00
link Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
load Bootstrap: Enhance core's memory limit handling. 2016-07-08 14:36:37 +00:00
media Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
menu Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
meta Tests: Speed up slashed data tests by reusing some more shared fixtures. 2020-09-19 11:11:00 +00:00
multisite Tests: Fix typo in some markTestSkipped() messages. 2020-09-21 20:18:20 +00:00
oembed Tests: Convert a few more function_exists() and extension_loaded() checks to @requires annotations. 2020-09-21 13:25:38 +00:00
option General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:13:57 +00:00
pomo Tests: Simplify PluralFormsTest::test_exceptions(). 2020-09-18 14:11:11 +00:00
post Tests: Convert the checks for imagejpeg() function availability to use the @requires annotation. 2020-09-21 11:34:06 +00:00
privacy Privacy: Improve clarity of privacy error strings. 2020-10-04 03:21:38 +00:00
query Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
rest-api REST API: Introduce Application Passwords for API authentication. 2020-10-08 22:12:02 +00:00
rewrite Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
sitemaps Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
taxonomy Tests: Add missing parent::setUp() calls to all test classes. 2019-01-14 04:54:01 +00:00
term General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:13:57 +00:00
theme Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
url Tests: Correct a number of malformed @covers tags. 2020-08-23 17:23:52 +00:00
user General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:13:57 +00:00
widgets Tests: Require imagejpeg() function in WP_Widget_Media_Image::render_media() test. 2020-09-26 14:50:51 +00:00
xmlrpc General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:13:57 +00:00
actions.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
adminbar.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
auth.php REST API: Introduce Application Passwords for API authentication. 2020-10-08 22:12:02 +00:00
avatar.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
basic.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
cache.php Tests: Add a test case for storing false in the cache. 2020-09-06 04:23:46 +00:00
canonical.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
category.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
comment-submission.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:13:57 +00:00
comment.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
compat.php Tests: Consistently use the expectException() method instead of the older @expectedException annotation. 2020-09-18 13:22:22 +00:00
cron.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
db.php Tests: Use consistent trailing punctuation in fail() messages. 2020-09-22 12:32:39 +00:00
dbdelta.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
dependencies.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
file.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
filters.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
functions.php Tests: Use consistent trailing punctuation in markTestSkipped() messages. 2020-09-21 14:05:23 +00:00
kses.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
l10n.php Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
link.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
locale.php Tests: Fix the failure in test_get_weekday_undefined_index() on PHP 8. 2020-09-18 10:56:27 +00:00
mail.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
media.php Tests: Fix a linting error in a test. 2020-10-01 21:42:40 +00:00
meta.php Tests: Replace a few instances of assertNotEquals() with assertNotFalse(). 2020-09-07 04:11:54 +00:00
multisite.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
pluggable.php Cache API: Introduce wp_cache_get_multi(). 2020-06-09 19:45:27 +00:00
post.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:13:57 +00:00
query.php Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
rest-api.php REST API: Support the patternProperties JSON Schema keyword. 2020-10-01 02:47:08 +00:00
rewrite.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
shortcode.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
site-health.php Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:31:22 +00:00
taxonomy.php Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
template.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
term.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
theme.php Tests: Use consistent trailing punctuation in fail() messages. 2020-09-22 12:32:39 +00:00
upload.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
url.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
user.php Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
walker.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
widgets.php Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
wp.php Coding Standards: Fix the remaining issues in /tests. 2019-07-08 00:55:20 +00:00