public function ResourceServer::__construct in Simple OAuth (OAuth2) & OpenID Connect 8.3
Same name and namespace in other branches
- 8.4 src/Server/ResourceServer.php \Drupal\simple_oauth\Server\ResourceServer::__construct()
- 8.2 src/Server/ResourceServer.php \Drupal\simple_oauth\Server\ResourceServer::__construct()
- 5.x src/Server/ResourceServer.php \Drupal\simple_oauth\Server\ResourceServer::__construct()
ResourceServer constructor.
File
- src/
Server/ ResourceServer.php, line 32
Class
Namespace
Drupal\simple_oauth\ServerCode
public function __construct(AccessTokenRepositoryInterface $access_token_repository, ConfigFactoryInterface $config_factory, HttpMessageFactoryInterface $message_factory, HttpFoundationFactoryInterface $foundation_factory) {
try {
$public_key = $config_factory
->get('simple_oauth.settings')
->get('public_key');
$public_key_real = realpath($public_key);
if ($public_key && $public_key_real) {
$this->subject = new LeageResourceServer($access_token_repository, $public_key_real);
}
} catch (\LogicException $exception) {
trigger_error($exception, E_USER_WARNING);
}
$this->messageFactory = $message_factory;
$this->foundationFactory = $foundation_factory;
}