
語言 🇹🇼 繁體中文
文件
快速入門
使用方式
FastComments PHP SSO SDK
這是 FastComments 官方的 PHP SSO SDK。
用於 FastComments SSO 整合的 PHP SDK
程式碼庫
AI 程式編寫代理 
為您的程式編寫代理提供 FastComments 所需的上下文——小工具、設定、Secure SSO、REST API 與 SDK:
npx skills add fastcomments/skills
支援 Claude Code、Codex、Cursor、Copilot、Gemini,以及所有其他由 skills CLI 支援的代理。
使用方式 
Simple SSO
Simple SSO 使用簡單,但安全性低於 Secure SSO:
use FastComments\SSO\FastCommentsSSO;
use FastComments\SSO\SimpleSSOUserData;
// Create user data
$userData = SimpleSSOUserData::create(
'username123',
'user@example.com',
'https://example.com/avatar.png'
);
// With URL-based login/logout
$sso = FastCommentsSSO::createWithUrls(
null,
$userData,
'https://example.com/login',
'https://example.com/logout'
);
// Or with callbacks
$sso = FastCommentsSSO::createWithCallbacks(
$userData,
function($url) { /* Handle login */ },
function($url) { /* Handle logout */ }
);
// Get the token to pass to FastComments
$token = $sso->prepareToSend();
Secure SSO
Secure SSO 透過 HMAC 驗證提供更高的安全性:
use FastComments\SSO\FastCommentsSSO;
use FastComments\SSO\SecureSSOUserData;
// Create user data
$userData = SecureSSOUserData::create(
'user-123',
'user@example.com',
'username123',
'https://example.com/avatar.png'
);
// Add optional data if needed
$userData->isAdmin = true;
$userData->groupIds = ['group-1', 'group-2'];
// Create the SSO object with your API key
$sso = FastCommentsSSO::createSecure('your-api-key', $userData);
// Get the token to pass to FastComments
$token = $sso->prepareToSend();
文件 
有關 FastComments SSO 的完整文件,請參閱 FastComments 文件.
需要幫助?
如果您在使用 PHP SSO SDK 時遇到任何問題或有任何疑問,請:
貢獻
歡迎各種貢獻!請造訪 GitHub 儲存庫 以查看貢獻指南。