PHP code example of devtoolcz / discordtokenrevoke

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

    

devtoolcz / discordtokenrevoke example snippets


use Nette;
use Devtoolcz\Discordtokenrevoke\DiscordRevoke;

final class ExamplePresenter extends Nette\Application\UI\Presenter
{

    /** @inject */
    private DiscordRevoke $discordRevoke;

    public function actionDiscordLogout()
    {
        $this->discordRevoke->createRevokeRequest('/oauth2/token/revoke')
            ->setToken('token here')->send();
    }
}