(PECL OAuth >= 1.0.0)
Set the consumerHandler handler callback
public void OAuthProvider::consumerHandler ( callable $callback_function )
Sets the consumer handler callback, which will later be called with OAuthProvider::callConsumerHandler().
Parameters:
callback_function
The callable functions name.
Returns:
No value is returned.
This function is currently not documented; only its argument list is available.
Examples:
Example OAuthProvider::consumerHandler() callback
<?php function lookupConsumer($provider) { if ($provider->consumer_key === 'unknown') { return OAUTH_CONSUMER_KEY_UNKNOWN; } else if($provider->consumer_key == 'blacklisted' || $provider->consumer_key === 'throttled') { return OAUTH_CONSUMER_KEY_REFUSED; } $provider->consumer_secret = "the_consumers_secret"; return OAUTH_OK; } ?>
See also:
Please login to continue.