'Refresh Authentication', 'message' => 'You have successfully your account authentication' ]; } /** @var RefreshAuthenticationTokenProcessor */ private $refreshAuthenticationTokenProcessor; /** * RefreshAuthenticationTokenLogic constructor. * @param RefreshAuthenticationTokenProcessor $refreshAuthenticationTokenProcessor */ public function __construct(RefreshAuthenticationTokenProcessor $refreshAuthenticationTokenProcessor) { $this->refreshAuthenticationTokenProcessor = $refreshAuthenticationTokenProcessor; } /** * @param Request $request * @return JsonResponse * @throws \App\Classes\Exceptions\InternalServerErrorException */ protected function logic(Request $request): JsonResponse { /** @var User $user */ $user = Auth()->user(); return $this->response($this->refreshAuthenticationTokenProcessor->execute($user)); } }