public function OAuth2Storage::expireAuthorizationCode in OAuth2 Server 8
Same name and namespace in other branches
- 2.0.x src/OAuth2Storage.php \Drupal\oauth2_server\OAuth2Storage::expireAuthorizationCode()
Expire authorization code.
Parameters
string $code: The authorization code.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
\Drupal\Core\Entity\EntityStorageException
File
- src/
OAuth2Storage.php, line 561
Class
- OAuth2Storage
- Provides Drupal OAuth2 storage for the library.
Namespace
Drupal\oauth2_serverCode
public function expireAuthorizationCode($code) {
/** @var \Drupal\oauth2_server\AuthorizationCodeInterface $authorization_code */
$authorization_code = $this
->getStorageAuthorizationCode($code);
if ($authorization_code) {
$authorization_code
->delete();
}
}