Ejemplo n.º 1
0
 /**
  * Each chain needs to fill this function with it's own actions.
  * This function contains the functionality of each chain.
  *
  * @param ConfigInterface $pConfig The configuration which is used to make the request.
  * @param InternalFactory $pInternalFactory The factory which is responsible for the internal object creation.
  * @return bool|stdClass true if the request has been processed, false otherwise
  */
 protected function process(ConfigInterface $pConfig, InternalFactory $pInternalFactory)
 {
     if ($pConfig->getAuthenticationMethod() !== Authenticate::AUTH_METHOD_TOKEN) {
         return false;
     }
     $token = $pConfig->getAuthenticationCredentials();
     return json_decode($pInternalFactory->getGuzzleFactory()->getGuzzleHandler()->get('token/' . $token)->getBody());
 }
Ejemplo n.º 2
0
 /**
  * Each chain needs to fill this function with it's own actions.
  * This function contains the functionality of each chain.
  *
  * @param ConfigInterface $pConfig The configuration which is used to make the request.
  * @param InternalFactory $pInternalFactory The factory which is responsible for the internal object creation.
  * @return bool|stdClass true if the request has been processed, false otherwise
  */
 protected function process(ConfigInterface $pConfig, InternalFactory $pInternalFactory)
 {
     if ($pConfig->getAuthenticationMethod() !== Authenticate::AUTH_METHOD_USER_CREDENTIALS) {
         return false;
     }
     $userCredentials = $pConfig->getAuthenticationCredentials();
     $userSession = $pConfig->getSession();
     $response = json_decode($pInternalFactory->getGuzzleFactory()->getGuzzleHandler()->get('user/logout/' . $userCredentials['username'] . '/' . $userSession)->getBody());
     return $response;
 }