Skip to content

Commit 8c99784

Browse files
authored
Merge pull request #7 from WP-API/add-to-index
Register OAuth 2 scheme in API index
2 parents a0ee4ba + 9a0e091 commit 8c99784

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

plugin.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ function bootstrap() {
1919
// Core authentication hooks.
2020
add_filter( 'determine_current_user', __NAMESPACE__ . '\\Authentication\\attempt_authentication', 11 );
2121
add_filter( 'rest_authentication_errors', __NAMESPACE__ . '\\Authentication\\maybe_report_errors' );
22+
add_filter( 'rest_index', __NAMESPACE__ . '\\register_in_index' );
2223

2324
// Internal default hooks.
2425
add_filter( 'oauth2.grant_types', __NAMESPACE__ . '\\register_grant_types', 0 );

0 commit comments

Comments
 (0)