本文整理匯總了PHP中OAuth2\Server::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Server::__construct方法的具體用法?PHP Server::__construct怎麽用?PHP Server::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類OAuth2\Server
的用法示例。
在下文中一共展示了Server::__construct方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
public function __construct(EntityManager $em)
{
$this->storage = new OAuth2Storage($em);
parent::__construct($this->storage, ['www_realm' => 'NovoSGA']);
$this->addGrantType(new ClientCredentials($this->storage));
$this->addGrantType(new AuthorizationCode($this->storage));
$this->addGrantType(new RefreshToken($this->storage, ['always_issue_new_refresh_token' => true]));
$this->addGrantType(new UserCredentials($this->storage));
$this->em = $em;
}
示例2: __construct
public function __construct($storage = array(), array $config = array(), array $grantTypes = array(), array $responseTypes = array(), TokenTypeInterface $tokenType = null, ScopeInterface $scopeUtil = null, ClientAssertionTypeInterface $clientAssertionType = null)
{
parent::__construct($storage, $config, $grantTypes, $responseTypes, $tokenType, $scopeUtil, $clientAssertionType);
}
示例3: __construct
public function __construct(Module $module, $storage = array(), array $config = array(), array $grantTypes = array(), array $responseTypes = array(), \OAuth2\TokenType\TokenTypeInterface $tokenType = null, \OAuth2\ScopeInterface $scopeUtil = null, \OAuth2\ClientAssertionType\ClientAssertionTypeInterface $clientAssertionType = null)
{
$this->module = $module;
parent::__construct($storage, $config, $grantTypes, $responseTypes, $tokenType, $scopeUtil, $clientAssertionType);
}
示例4: __construct
/**
* Constructor
*
* @param bdApi_Model_OAuth2 $model
*/
public function __construct(bdApi_Model_OAuth2 $model)
{
$storage = new bdApi_OAuth2_Storage($model);
parent::__construct(array('access_token' => $storage, 'authorization_code' => $storage, 'client_credentials' => $storage, 'user_credentials' => $storage, 'refresh_token' => $storage), array('auth_code_lifetime' => bdApi_Option::get('authCodeTTL'), 'access_lifetime' => bdApi_Option::get('tokenTTL'), 'refresh_token_lifetime' => bdApi_Option::get('refreshTokenTTLDays') * 86400, 'token_param_name' => 'oauth_token', 'enforce_state' => false, 'require_exact_redirect_uri' => false, 'allow_implicit' => true, 'always_issue_new_refresh_token' => true));
$this->_model = $model;
}