Answer the question
In order to leave comments, you need to log in
How to do basic authentication on a specific route in symfony 5.2.2?
Tell me how to quickly and easily make basic authentication on a specific route?
Example:
class PostsController extends AbstractController
{
/**
* @Route("/master/posts/new", name="new-posts", methods={"GET","HEAD"})
* @return mixed
*/
public function index()
{
return $this->render('post/master/new.html.twig', [
'form' => new PostType()
]);
}
}
Answer the question
In order to leave comments, you need to log in
https://symfony.com/doc/current/security.html#the-...
https://symfony.com/doc/current/security.html#http...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question