src/Controller/SecurityController.php line 15
<?phpnamespace App\Controller;use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;use Symfony\Component\HttpFoundation\Response;use Symfony\Component\HttpFoundation\Request;use Symfony\Component\Routing\Annotation\Route;use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;use App\Security\AzureAuthenticator;class SecurityController extends AbstractController{#[Route('/login', name: 'app_login')]public function login(Request $request): Response{if ($this->getUser()) {return $this->redirectToRoute('app_index');}return $this->render('security/login.html.twig');}#[Route('/login/azure/check', name: 'app_login_azure')]public function azure(Request $request, AuthenticationUtils $authenticationUtils, AzureAuthenticator $azureAuthenticator): Response{if($request->isMethod('POST')) {$baseGraphUri = $azureAuthenticator->getAzureProvider()->getRootMicrosoftGraphUri(null);$authorizationUrl = $azureAuthenticator->getAzureProvider()->getAuthorizationUrl(['scope' => $azureAuthenticator->getAzureProvider()->scope]);$request->getSession()->set('azure_api_state',$azureAuthenticator->getAzureProvider()->getState());return $this->redirect($authorizationUrl);}return $this->redirectToRoute('app_login');}#[Route('/logout', name: 'app_logout')]public function logout(){throw new \Exception('This method can be blank - it will be intercepted by the logout key on the firewall');}}