OAuthProvider::timestampNonceHandler
(PECL OAuth >= 1.0.0)
OAuthProvider::timestampNonceHandler — 设置 timestampNonceHandler 句柄回调函数
说明
设置时间戳 nonce 句柄回调函数,此函数将在后面被 OAuthProvider::callTimestampNonceHandler() 调用。跟时间戳/nonce相关的错误将被抛给此回调函数。
警告
本函数还未编写文档,仅有参数列表。
参数
-
callback_function
-
回调类型 的函数名。
返回值
没有返回值。
范例
示例 #1 OAuthProvider::timestampNonceHandler() 回调的例子
<?php
function timestampNonceChecker($provider) {
if ($provider->nonce === 'bad') {
return OAUTH_BAD_NONCE;
} elseif ($provider->timestamp == '0') {
return OAUTH_BAD_TIMESTAMP;
}
return OAUTH_OK;
}
?>
参见
- OAuthProvider::callTimestampNonceHandler() - 调用 timestampNonceHandler 回调函数

User Contributed Notes
There are no user contributed notes for this page.
备份地址:http://www.lvesu.com/blog/php/oauthprovider.timestampnoncehandler.php