FastComments.com

FastComments PHP SSO SDK

Dit is de officiële PHP SSO SDK voor FastComments.

PHP SDK voor FastComments SSO-integratie

Repository

Bekijk op GitHub

AI-coderingsagenten Internal Link

skills.sh

Geef je code‑agent de FastComments‑context die hij nodig heeft - widgets, configuratie, Secure SSO, de REST‑API en de SDK’s:

npx skills add fastcomments/skills

Werkt met Claude Code, Codex, Cursor, Copilot, Gemini en elke andere agent die de skills CLI ondersteunt.

Installatie Internal Link

composer require fastcomments/sso

Gebruik Internal Link

Simple SSO

Simple SSO is eenvoudig te gebruiken, maar biedt minder beveiliging dan Secure SSO:

use FastComments\SSO\FastCommentsSSO;
use FastComments\SSO\SimpleSSOUserData;

// Gebruikersgegevens aanmaken
$userData = SimpleSSOUserData::create(
    'username123',
    'user@example.com',
    'https://example.com/avatar.png'
);

// Met URL-gebaseerde login/logout
$sso = FastCommentsSSO::createWithUrls(
    null,
    $userData,
    'https://example.com/login',
    'https://example.com/logout'
);

// Of met callbacks
$sso = FastCommentsSSO::createWithCallbacks(
    $userData,
    function($url) { /* Login afhandelen */ },
    function($url) { /* Logout afhandelen */ }
);

// Haal de token op om door te geven aan FastComments
$token = $sso->prepareToSend();

Secure SSO

Secure SSO biedt verbeterde beveiliging met HMAC-verificatie:

use FastComments\SSO\FastCommentsSSO;
use FastComments\SSO\SecureSSOUserData;

// Gebruikersgegevens aanmaken
$userData = SecureSSOUserData::create(
    'user-123',
    'user@example.com',
    'username123',
    'https://example.com/avatar.png'
);

// Optionele gegevens toevoegen indien nodig
$userData->isAdmin = true;
$userData->groupIds = ['group-1', 'group-2'];

// Maak het SSO-object aan met je API-sleutel
$sso = FastCommentsSSO::createSecure('your-api-key', $userData);

// Haal de token op om door te geven aan FastComments
$token = $sso->prepareToSend();

Documentatie Internal Link

Voor volledige documentatie over FastComments SSO, raadpleeg de FastComments-documentatie.

Hulp nodig?

Als u problemen ondervindt of vragen heeft over de PHP SSO SDK, gelieve:

Bijdragen

Bijdragen zijn welkom! Bezoek de GitHub repository voor richtlijnen voor bijdragen.