public function AuthorizationCode::__construct in Simple OAuth (OAuth2) & OpenID Connect 5.x
Same name and namespace in other branches
- 8.4 src/Plugin/Oauth2Grant/AuthorizationCode.php \Drupal\simple_oauth\Plugin\Oauth2Grant\AuthorizationCode::__construct()
Class constructor.
Overrides PluginBase::__construct
File
- src/
Plugin/ Oauth2Grant/ AuthorizationCode.php, line 46
Class
- AuthorizationCode
- The authorization code grant plugin.
Namespace
Drupal\simple_oauth\Plugin\Oauth2GrantCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, AuthCodeRepositoryInterface $auth_code_repository, RefreshTokenRepositoryInterface $refresh_token_repository, ConfigFactoryInterface $config_factory) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$settings = $config_factory
->get('simple_oauth.settings');
$this->authCodeRepository = $auth_code_repository;
$this->refreshTokenRepository = $refresh_token_repository;
$this->authCodeExpiration = new \DateInterval(sprintf('PT%dS', $settings
->get('authorization_code_expiration')));
}