Exemplo n.º 1
0
 protected function _processRequest(ApiRequestInterface $request)
 {
     try {
         return $request->get();
     } catch (AccessDeniedException $e) {
         $this->_fortifi->getToken(true);
         return $request->get();
     }
 }
Exemplo n.º 2
0
 public static function processRequest(Fortifi $fortifi, ApiRequestInterface $request)
 {
     try {
         return $request->get();
     } catch (AccessDeniedException $e) {
         $token = $fortifi->getToken(true);
         $fortifi->getApi()->setAccessToken($token->accessToken);
         return $request->get();
     }
 }