PHP code example of gfreeau / get-jwt-bundle

1. Go to this page and download the library: Download gfreeau/get-jwt-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/ */

    

gfreeau / get-jwt-bundle example snippets


/**
 * @Route("/api/getToken")
 * @Method({"POST"})
 */
public function getTokenAction()
{
    // The security layer will intercept this request
    return new Response('', 401);
}
 php
public function registerBundles()
{
    return array(
        // ...
        new Gfreeau\Bundle\GetJWTBundle\GfreeauGetJWTBundle(),
        // ...
    );
}