PHP code example of r3h6 / oauth2-server
1. Go to this page and download the library: Download r3h6/oauth2-server 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/ */
r3h6 / oauth2-server example snippets
class ExtbaseController extends ActionController
{
/**
* @var \R3H6\Oauth2Server\Security\ExtbaseGuard
* @TYPO3\CMS\Extbase\Annotation\Inject
*/
protected $guard;
public function initializeAction()
{
$this->guard->checkAccess($GLOBALS['TYPO3_REQUEST'], 'my_resource', $this->response); //v10
$this->guard->checkAccess($GLOBALS['TYPO3_REQUEST'], 'my_resource'); //v11
}
}