(PECL OAuth >= 1.0.0)
OAuthProvider::tokenHandler — Set the tokenHandler handler callback
Sets the token handler callback, which will later be called with OAuthProvider::callTokenHandler().
本函数还未编写文档,仅有参数列表。
The callback functions name.
没有返回值。
Example #1 Example OAuthProvider::tokenHandler() callback
<?php
function tokenHandler($provider) {
if ($provider->token === 'rejected') {
return OAUTH_TOKEN_REJECTED;
} elseif ($provider->token === 'revoked') {
return OAUTH_TOKEN_REVOKED;
}
$provider->token_secret = "the_tokens_secret";
return OAUTH_OK;
}
?>