public static function AccessToken::defaultExpiration in Simple OAuth (OAuth2) & OpenID Connect 8
Returns the defaul expiration.
Return value
array The default expiration timestamp.
Overrides AccessTokenInterface::defaultExpiration
2 calls to AccessToken::defaultExpiration()
- AccessToken::refresh in src/
Entity/ AccessToken.php - If this is an refresh token, the refresh token will refresh and provide a new access token
- AccessTokenIssue::issue in src/
Controller/ AccessTokenIssue.php
File
- src/
Entity/ AccessToken.php, line 356
Class
- AccessToken
- Defines the Access Token entity.
Namespace
Drupal\simple_oauth\EntityCode
public static function defaultExpiration() {
$expiration = \Drupal::config('simple_oauth.settings')
->get('expiration') ?: static::DEFAULT_EXPIRATION_PERIOD;
return [
REQUEST_TIME + $expiration,
];
}