1. Go to this page and download the library: Download pozitim/auth-client library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pozitim / auth-client example snippets
$logger = new Logger();
$loggerListener = new \Pozitim\AuthClient\Turkcell\PsrLoggerListenerImpl($logger);
$sessionClient = new \Pozitim\AuthClient\Turkcell\SessionClientImpl();
$sessionClient->setApiEndpoint('http://auth.domain.com/api');
$sessionClient->setTurkcellEndpoint(''); // API dökümanına göz atılabilir.
$sessionClient->setServiceVariantId(123456);
$sessionClient->setSpId(1234);
$sessionClient->setPassword(12345678);
$sessionClient->setListener($loggerListener);
$sessionId = $sessionClient->getSessionId();
$memcached = new Memcached();
$sessionCacheClient = new \Pozitim\AuthClient\Turkcell\SessionCacheClientImpl($sessionClient, $memcached);
$sessionId = $sessionCacheClient->getSessionId();