有没有人有使用这个插件的经验?我已经获得了 php 的客户端库,并在我的 Controller 中设置了适当的功能。当我从 vanilla 的插件设置页面单击“测试”时,我得到了有效的响应,但现在我被卡住了......我该从哪里开始?
为了更清楚这个问题,我不知道我的下一步是什么。我的意思是,我知道我一定遗漏了一些东西……这是我用作插件端点的 Controller 功能(或页面):
// 1. Get your client ID and secret here.
$clientID = "1234";
$secret = "1234";
// 2. Grab the current user from your session management system or database here.
//so i check to see if the user is logged in to my codeigniter's auth
//all works fine
// 3. Fill in the user information in a way that Vanilla can understand.
$user = array();
if ($signedIn) {
// i then set these according to the user info of the logged in user
$user['uniqueid'] = '123';
$user['name'] = 'John PHP';
$user['email'] = 'john.php@anonymous.com';
$user['photourl'] = '';
}
// 4. Generate the jsConnect string.
$secure = true;
WriteJsConnect($user, $_GET, $clientID, $secret, $secure);
http://vanillaforums.org/docs/jsconnect是 docs 站点,它没有提到在我当前的观点之后要做什么。
最佳答案
我也必须自己解决这个问题,昨晚终于做到了。我已经编写了这些文件并将它们放入 github 存储库,以便其他使用 CodeIgniter 的人可以更轻松地通过他们的站点享受 JsConnect 功能。我真的很喜欢它现在它正在工作!
您可以下载代码,然后按照此处的自述文件操作:
https://github.com/mandersondesign/JSConnect-Codeigniter
如果您有任何问题,请告诉我,我会帮助您!
关于codeigniter - vanilla/codeigniter 登录与 jsconnect/SSO 集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10533464/