Links an OAuth authorization token with a Customer
Автор: Berny Cantos (be@rny.cc)
Наследование: implements Elcodi\Store\ConnectBundle\Entity\Interfaces\AuthorizationInterface, use trait Elcodi\Component\Core\Entity\Traits\IdentifiableTrait
Пример #1
0
 /**
  * Updates an existing authorization with data from the resource owner
  *
  * @param Authorization         $authorization Authorization
  * @param UserResponseInterface $response      Response of the resource owner
  *
  * @return Authorization
  */
 protected function updateAuthorization(Authorization $authorization, UserResponseInterface $response)
 {
     $expirationDate = $this->getExpirationDate($response->getExpiresIn());
     $authorization->setAuthorizationToken($response->getAccessToken())->setExpirationDate($expirationDate);
     return $authorization;
 }