PHP code example of stgbundle / cas-bundle

1. Go to this page and download the library: Download stgbundle/cas-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

stgbundle / cas-bundle example snippets


// src/Controller/DefaultController.php

    /**
     * @Route("/secure/logout")
    */
    public function logout()
    {
    }

    /**
    * @Route("/failure", name="failure")
    */    
    public function failure(Request $request): Response
    {
        return new Response(
            'Error al autenticar - Usuario: ' . $request->get('user')
        );
    }