本文整理汇总了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;
}