<?php
namespace App\Controller;
use KnpU\OAuth2ClientBundle\Client\ClientRegistry;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
class OAuthController extends AbstractController
{
/**
* @Route("/oauth/login", name="oauth_login")
*/
public function index(ClientRegistry $clientRegistry): RedirectResponse
{
return $clientRegistry->getClient('keycloack')->redirect();
}
/**
* @Route("/oauth/callback", name="oauth_check")
*/
public function connectCheckAction(Request $request, ClientRegistry $clientRegistry)
{
}
/**
* @Route("/logout", name="logout")
*/
public function logout()
{
}
}