Extending the OpenID Discovery API | How To | WP OAuth Server

Extending the OpenID Discovery API

Documentation under "How To" for WP OAuth Server


To extend the OpenID Discovery API, you have the option to use WordPress’s filter API. Below is an example of how to extend the OpenID Discovery API and add a new parameter to the response of “new_value_key”.

function modify_openid_discovery_api( $return ) {
    $return['new_discovery_value'] = array(
        'new_value_key' => 'Some value'
    );

    return $return;
}

add_filter( 'wo_openid_discovery', 'modify_openid_discovery_api' );