Massive simplification of code for displaying webmentions of notes, and the micropub client used to make a note

This commit is contained in:
Jonny Barnes 2017-06-22 15:41:23 +01:00
parent c96539f9c8
commit 8477aba87b
6 changed files with 173 additions and 117 deletions

View file

@ -4,6 +4,7 @@ declare(strict_types=1);
namespace App\Services;
use App\Jobs\AddClientToDatabase;
use Lcobucci\JWT\Signer\Hmac\Sha256;
use App\Exceptions\InvalidTokenException;
use Lcobucci\JWT\{Builder, Parser, Token};
@ -26,6 +27,7 @@ class TokenService
->set('nonce', bin2hex(random_bytes(8)))
->sign($signer, config('app.key'))
->getToken();
dispatch(new AddClientToDatabase($data['client_id']));
return (string) $token;
}