/**
  * {@inheritdoc}
  */
 public function prepareAuthorization(AuthorizationInterface $authorization)
 {
     $token_type = $this->getTokenTypeFromRequest($authorization->getQueryParams());
     $token = $this->getAccessTokenManager()->createAccessToken($authorization->getClient(), $authorization->getUserAccount(), $token_type->getTokenTypeInformation(), $authorization->getQueryParams(), $authorization->getScopes(), null, null, ['redirect_uri' => $authorization->getRedirectUri()]);
     $authorization->setData('access_token', $token);
     return $token->toArray();
 }
 /**
  * {@inheritdoc}
  */
 public function finalizeAuthorization(array &$response_parameters, AuthorizationInterface $authorization, $redirect_uri)
 {
     $params = $authorization->getQueryParams();
     $requested_claims = $this->getIdTokenClaims($authorization);
     $id_token = $this->getIdTokenManager()->createIdToken($authorization->getClient(), $authorization->getUserAccount(), $redirect_uri, $authorization->hasQueryParam('claims_locales') ? $authorization->getQueryParam('claims_locales') : null, $requested_claims, $authorization->getScopes(), ['nonce' => $params['nonce']], $authorization->hasData('access_token') ? $authorization->getData('access_token') : null, $authorization->hasData('code') ? $authorization->getData('code') : null);
     $authorization->setData('id_token', $id_token);
     $response_parameters = array_merge($response_parameters, $id_token->toArray());
 }
 /**
  * {@inheritdoc}
  */
 public function prepareAuthorization(AuthorizationInterface $authorization)
 {
     $token_type = $this->getTokenTypeFromRequest($authorization->getQueryParams());
     $token = $this->getAccessTokenManager()->createAccessToken($authorization->getClient(), $authorization->getUserAccount(), $token_type->getTokenTypeInformation(), $authorization->getQueryParams(), $authorization->getScopes(), null, null, ['redirect_uri' => $authorization->getQueryParam('redirect_uri')]);
     $authorization->setData('access_token', $token);
     foreach ($this->listeners as $listener) {
         $listener->call($token);
     }
     return [];
 }