/** * @return array * @throws \League\OAuth2\Server\Exception\InvalidClientException * @throws \League\OAuth2\Server\Exception\InvalidRefreshException * @throws \League\OAuth2\Server\Exception\InvalidRequestException * @throws \League\OAuth2\Server\Exception\InvalidScopeException */ public function completeFlow() { $response = parent::completeFlow(); // update user oauth token in session Session::put('oauth', $response); return $response; }
/** * {@inheritdoc} */ public function completeFlow() { parent::completeFlow(); $accessToken = $this->server->getTokenType()->getParam('access_token'); $accessToken = $this->server->getAccessTokenStorage()->get($accessToken); $this->server->getTokenType()->setParam('expires', (int) $accessToken->getExpireTime()); return $this->server->getTokenType()->generateResponse(); }