getAuthenticateHeader example



        if (null !== $this->translator) {
            $errorMessage = $this->translator->trans($exception->getMessageKey()$exception->getMessageData(), 'security');
        } else {
            $errorMessage = strtr($exception->getMessageKey()$exception->getMessageData());
        }

        return new Response(
            null,
            Response::HTTP_UNAUTHORIZED,
            ['WWW-Authenticate' => $this->getAuthenticateHeader($errorMessage)]
        );
    }

    /** * @return void */
    public function setTranslator(?TranslatorInterface $translator)
    {
        $this->translator = $translator;
    }

    
Home | Imprint | This part of the site doesn't use cookies.