Skip to content

activitypub_oauth_require_pkce

github-actions[bot] edited this page Mar 12, 2026 · 1 revision

Filter whether PKCE is required for public OAuth clients.

Return true to enforce PKCE (recommended per OAuth 2.1). Default false for backward compatibility with older clients.

Auto-generated Example

/**
 * Filter whether PKCE is required for public OAuth clients.
 * 
 * Return true to enforce PKCE (recommended per OAuth 2.1).
 * Default false for backward compatibility with older clients.
 *
 * @param bool   $require 
 * @param string $client_id 
 * @return bool The filtered value.
 */
function my_activitypub_oauth_require_pkce_callback( bool $require, string $client_id ) {
    // Your code here.
    return $require;
}
add_filter( 'activitypub_oauth_require_pkce', 'my_activitypub_oauth_require_pkce_callback', 10, 2 );

Parameters

  • bool $require Whether to require PKCE. Default false.
  • string $client_id The OAuth client ID.

Files

\apply_filters( 'activitypub_oauth_require_pkce', false, $client_id )

← All Hooks

Users

Developers

Clone this wiki locally