public function flushAccessToken() { $this->storage->delete(self::ACCESS_TOKEN_KEY); $this->storage->delete(self::EXPIRE_TIME_KEY); $this->storage->delete(self::GRAND_TYPE_KEY); }
/** * Handle the creation of auth code. * * This belongs in a separate factory, but to keep it simple, I'm just * keeping it here. * * @param $client_id * Client identifier related to the access token. * @param $redirect_uri * An absolute URI to which the authorization server will redirect the * user-agent to when the end-user authorization step is completed. * @param $scope * (optional) Scopes to be stored in space-separated string. * * @ingroup oauth2_section_4 */ private function createAuthCode($client_id, $user_id, $redirect_uri, $scope = null) { $code = $this->genAuthCode(); $this->storage->setAuthCode($code, $client_id, $user_id, $redirect_uri, time() + $this->getVariable(self::CONFIG_AUTH_LIFETIME), $scope); return $code; }