CAPIT CONNECT
Ziyaretçileriniz için oturum açma, kendiniz entegre etmeden
Sitenizde tek bir “CAPIT ile giriş yap” düğmesi: ziyaretçileriniz adınızı ve logonuzu taşıyan bir CAPIT penceresinde Google, Apple, Facebook, LinkedIn, Snapchat veya e-posta adreslerini seçer. OpenID Connect standardıyla doğrulanmış bir kimlik alırsınız.
Kartsız 1 ay ücretsiz · Ardından ayda 5 €, taahhütsüz: sınırsız oturum açma ve Jeanne’in desteği dahil.
- Google, Apple, Facebook, LinkedIn ve Snapchat uygulamalarını kendiniz oluşturmadan altı oturum açma yolu.
- OpenID Connect standardı: yaygın tüm kütüphaneler çalışır (PHP, Node, Python, WordPress…).
- Sitenizin adını ve logosunu taşıyan pencere, ziyaretçinin açık onayı.
- Yapay zekâ asistanımız Jeanne entegrasyona yardım eder ve yapılandırma hatalarınızı okur.
Üç adımda
- Uygulamanızı konsolda oluşturun: ad, logo, https dönüş adresleri.
- Tanımlayıcıyı ve gizli anahtarı OpenID Connect kütüphanenize kopyalayın.
- Düğmeyi ekleyin: ziyaretçiler oturum açar, siz kimliklerini alırsınız.
Entegrasyon belgeleri
CAPIT Connect standart bir OpenID Connect sağlayıcısıdır. Keşif adresini kütüphanenize verin: uç noktaları ve anahtarları kendisi bulur.
Keşif adresi
https://connect.capit.net/oidc/.well-known/openid-configuration
Uç noktalar
| issuer | https://connect.capit.net/oidc |
|---|---|
| authorization_endpoint | https://connect.capit.net/oidc/auth |
| token_endpoint | https://connect.capit.net/oidc/token |
| userinfo_endpoint | https://connect.capit.net/oidc/me |
| jwks_uri | https://connect.capit.net/oidc/jwks |
| end_session_endpoint | https://connect.capit.net/oidc/session/end |
| revocation_endpoint | https://connect.capit.net/oidc/token/revocation |
Desteklenen akış
- Yetkilendirme kodu (response_type=code); herkese açık bir uygulama (tarayıcı, mobil) için PKCE S256 zorunlu, diğer durumlarda önerilir.
- Uygulama kimlik doğrulaması: client_secret_basic veya client_secret_post; herkese açık uygulamada yok.
- Kapsamlar: openid, email (email, email_verified), profile (given_name, name, locale). RS256 ile imzalı kimlik belirteci.
- sub uygulamanıza özeldir: saklanacak tanımlayıcı odur; başka bir siteyle eşleştirilemez.
- Süreler: kod 5 dakika, erişim belirteci ve kimlik belirteci 1 saat.
- Tıklamasız tanıma: bildirilen bir dönüş adresinin origin’inden GET https://connect.capit.net/connexion/sso/statut (credentials: 'include') {"connecte": true|false} döndürür; true ise oturum açmayı prompt=none ile başlatın: kod ekransız döner (ilk onaydan sonra).
Örnekler
PHP (jumbojett/openid-connect-php)
<?php
require 'vendor/autoload.php';
use Jumbojett\OpenIDConnectClient;
$oidc = new OpenIDConnectClient('https://connect.capit.net/oidc', 'cc_VOTRE_CLIENT_ID', getenv('CAPIT_CONNECT_SECRET'));
$oidc->setRedirectURL('https://votre-site.example/auth/retour');
$oidc->addScope(['openid', 'email', 'profile']);
$oidc->setCodeChallengeMethod('S256');
$oidc->authenticate(); // redirects to CAPIT Connect, then validates the response
$sub = $oidc->getVerifiedClaims('sub'); // stable identifier for your site
$email = $oidc->getVerifiedClaims('email');Node.js (openid-client 6)
import * as client from 'openid-client';
const config = await client.discovery(new URL('https://connect.capit.net/oidc'), 'cc_VOTRE_CLIENT_ID', process.env.CAPIT_CONNECT_SECRET);
// login route
const verifier = client.randomPKCECodeVerifier();
const url = client.buildAuthorizationUrl(config, {
redirect_uri: 'https://votre-site.example/auth/retour', scope: 'openid email profile',
code_challenge: await client.calculatePKCECodeChallenge(verifier), code_challenge_method: 'S256',
});
// callback route (keep verifier in the user's session)
const tokens = await client.authorizationCodeGrant(config, currentUrl, { pkceCodeVerifier: verifier });
const { sub, email, given_name } = tokens.claims();Python (Authlib + Flask)
from authlib.integrations.flask_client import OAuth
oauth = OAuth(app)
oauth.register('capit', client_id='cc_VOTRE_CLIENT_ID', client_secret=os.environ['CAPIT_CONNECT_SECRET'],
server_metadata_url='https://connect.capit.net/oidc/.well-known/openid-configuration',
client_kwargs={'scope': 'openid email profile', 'code_challenge_method': 'S256'})
@app.route('/login')
def login():
return oauth.capit.authorize_redirect('https://votre-site.example/auth/retour')
@app.route('/auth/retour')
def retour():
user = oauth.capit.authorize_access_token()['userinfo'] # sub, email, given_nameWordPress
Plugin « OpenID Connect Generic Client »
Client ID: cc_VOTRE_CLIENT_ID
Client Secret Key: (secret from the console)
OpenID Scope: openid email profile
Login Endpoint URL: https://connect.capit.net/oidc/auth
Userinfo Endpoint URL: https://connect.capit.net/oidc/me
Token Validation URL: https://connect.capit.net/oidc/token
End Session Endpoint: https://connect.capit.net/oidc/session/end
Redirect URI to declare in the console: https://votre-site.example/wp-admin/admin-ajax.php?action=openid-connect-authorizeDüğme
Bu düğmeyi sitenizde oturum açmayı başlatan yola bağlayın (CAPIT Connect’e yönlendirir).
<a class="capit-connect-btn" href="/auth/capit">
<svg width="20" height="20" viewBox="0 0 24 24" aria-hidden="true"><rect width="24" height="24" rx="6" fill="#653b88"/><path d="M15.5 8.2a5 5 0 1 0 0 7.6" fill="none" stroke="#fff" stroke-width="2.2" stroke-linecap="round"/></svg>
<span>CAPIT ile giriş yap</span>
</a>
<style>
.capit-connect-btn{display:inline-flex;align-items:center;gap:10px;padding:10px 18px;border:1px solid #d6cfe0;border-radius:999px;
background:#fff;color:#2b1d3a;font:600 15px/1 system-ui,sans-serif;text-decoration:none}
.capit-connect-btn:hover{border-color:#653b88}
</style>Test sayfası
Her uygulama CAPIT test sayfasına izin verebilir: kod yazmadan önce oturum açma penceresini denemek için konsolda bir tıklama yeterlidir. Abonelik olmadan yalnızca test sayfası çalışır.
Güvenlik
- https dönüş adresleri birebir karşılaştırılır: joker karakter, parça veya IP adresi yok.
- Gizli anahtar yalnızca bir kez gösterilir ve özet olarak saklanır; 24 saat örtüşmeli yenileme.
- Konsolunuzda 13 ay saklanan oturum açma ve hata günlüğü.
- Hız sınırlaması; ortak CAPIT oturumu: zaten oturum açmış bir üye hiçbir şeyi yeniden yazmaz, onayı site başına yalnızca bir kez istenir.
Jeanne desteği
Jeanne, entegrasyon sorularınızı mevcut en iyi yapay zekâ modeliyle yanıtlar; uygulamalarınızın ayarlarını (gizli anahtarları asla) ve son hatalarını görür. Aboneliğe dahil, ayda en fazla 1 € maliyetle.
Kişisel veriler
Siteniz, ziyaretçinin onayıyla yalnızca uygulamanıza özel tanımlayıcıyı, e-posta adresini ve adı alır. Kimlik doğrulamada CAPIT, sitenizin veri işleyeni olarak hareket eder; aldığınız verilerin sorumlusu siz olmaya devam edersiniz.
