Use an actaully valid token in debug mode

This commit is contained in:
Jonny Barnes 2016-10-03 17:45:21 +01:00
parent f5dbc2b35f
commit 5df1d6aac3
2 changed files with 1 additions and 10 deletions

View file

@ -48,14 +48,8 @@ class AppServiceProvider extends ServiceProvider
//allow micropub use in development //allow micropub use in development
if (env('APP_DEBUG') == true) { if (env('APP_DEBUG') == true) {
$tokenService = new \App\Services\TokenService();
$token = $tokenService->getNewToken([
'me' => 'https://jonnybarnes.localhost',
'client_id' => 'https://jonnybarnes.localhost/notes/new',
'scope' => 'post'
]);
session(['me' => 'https://jonnybarnes.localhost']); session(['me' => 'https://jonnybarnes.localhost']);
session(['token' => 'abc123']); session(['token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtZSI6Imh0dHBzOlwvXC9qb25ueWJhcm5lcy5sb2NhbGhvc3QiLCJjbGllbnRfaWQiOiJodHRwczpcL1wvam9ubnliYXJuZXMubG9jYWxob3N0XC9ub3Rlc1wvbmV3Iiwic2NvcGUiOiJwb3N0IiwiZGF0ZV9pc3N1ZWQiOjE0NzU1MTI0NDgsIm5vbmNlIjoiYzE0MzNmNzg5ZTY4Y2M1OSJ9.7Bj9yLnWJOyVre8BPihAom2G0MEsmS3tIUraDI-GRNg']);
} }
} }

View file

@ -38,9 +38,6 @@ class TokenService
*/ */
public function validateToken($token) public function validateToken($token)
{ {
if (env('APP_DEBUG') == true) {
return true;
}
$signer = new Sha256(); $signer = new Sha256();
try { try {
$token = (new Parser())->parse((string) $token); $token = (new Parser())->parse((string) $token);