OAuthProvider::consumerHandler

Set the consumerHandler handler callback

&reftitle.description; public `void` `OAuthProvider::consumerHandler` `callable` `callback_function`

Sets the consumer handler callback, which will later be called with `OAuthProvider::callConsumerHandler`.

&warn.undocumented.func;
&reftitle.parameters;

`callback_function`

- The `callable` functions name.

&reftitle.returnvalues;

&return.void;

&reftitle.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;
    }
    ?>

&reftitle.seealso;

- `OAuthProvider::callConsumerHandler`