You are here

public function AuthorizationCode::getGrantType in Simple OAuth (OAuth2) & OpenID Connect 8.3

Same name and namespace in other branches
  1. 8.2 simple_oauth_extras/src/Plugin/Oauth2Grant/AuthorizationCode.php \Drupal\simple_oauth_extras\Plugin\Oauth2Grant\AuthorizationCode::getGrantType()

Gets the grant object.

Parameters

League\OAuth2\Server\Grant\GrantTypeInterface: The grant type.

Overrides Oauth2GrantInterface::getGrantType

File

simple_oauth_extras/src/Plugin/Oauth2Grant/AuthorizationCode.php, line 64

Class

AuthorizationCode
Plugin annotation @Oauth2Grant( id = "authorization_code", label = @Translation("Authorization Code") )

Namespace

Drupal\simple_oauth_extras\Plugin\Oauth2Grant

Code

public function getGrantType() {
  return new AuthCodeGrant($this->authCodeRepository, $this->refreshTokenRepository, $this->authCodeExpiration);
}