<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use App\Srgssr\Auth;

class SrgssrOauth extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'srgssr:oauth {uri}';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Renew Bearer Token for SRG-SSR Oauth.';

    /**
     * Execute the console command.
     */
    public function handle()
    {
        Auth::renewal($this->argument('uri'));
        $this->info('Renewal completed!');
    }
}