07月 17th, 2008

Discuz通行证(Discuz! Passport)整合时错误提示详解

Category: 未分类, Author: admin, Popularity: 92% [?]

 

Illegal request

非法请求,当验证字串 verify 不匹配时会产生此提示。可能是应用程序与 Discuz! 配置的私有密匙不同,或是通过 URL 传递前,未将必要的参数(如 auth、forward 等)进行 URL 编码,也有可能是使用了经过 URL 编码的参数值用来计算 verify 的 md5 值造成。以 PHP 语言为例,正确的代码应当是类似于的如下的格式:

$action = ‘login’;
$auth = passport_encrypt(passport_encode($autharray), $passport_key);
$forward = ‘http://www.discuz.net/index.php’;
$verify = md5($action.$auth.$forward.$passport_key);

header(”Location: http://www.discuz.net/api/passport.php“.
“?action=$action”.
“&auth=”.rawurlencode($auth).
“&forward=”.rawurlencode($forward).
“&verify=$verify”);

Lack of required parameters

auth 内容解密后,缺少必要的信息 time、username、password、email。

Request expired

请求过期。当前服务器时间与应用程序提交过来的 time 之差大于 Discuz! Passport 中设置的请求有效期。可能是使用以往的代码非法尝试,也可能是由于应用程序和 Discuz! 论坛所在的两台服务器,时间设置有误造成。

Invalid action

没有指定 Passport 所执行的 action。

Popularity: 92% [?]

Tags:, , , .
评论数量(0) | Add Comments
本文网址:http://www.babaniu.com/html/200807/24.html

There are No comments.

» You can leave a response or Trackback .

leave a reply