From 5df1d6aac3c17c7175c5729eb8c524710f7bdf8e Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Mon, 3 Oct 2016 17:45:21 +0100 Subject: [PATCH] Use an actaully valid token in debug mode --- app/Providers/AppServiceProvider.php | 8 +------- app/Services/TokenService.php | 3 --- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index bef52b74..a940dc3c 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -48,14 +48,8 @@ class AppServiceProvider extends ServiceProvider //allow micropub use in development 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(['token' => 'abc123']); + session(['token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtZSI6Imh0dHBzOlwvXC9qb25ueWJhcm5lcy5sb2NhbGhvc3QiLCJjbGllbnRfaWQiOiJodHRwczpcL1wvam9ubnliYXJuZXMubG9jYWxob3N0XC9ub3Rlc1wvbmV3Iiwic2NvcGUiOiJwb3N0IiwiZGF0ZV9pc3N1ZWQiOjE0NzU1MTI0NDgsIm5vbmNlIjoiYzE0MzNmNzg5ZTY4Y2M1OSJ9.7Bj9yLnWJOyVre8BPihAom2G0MEsmS3tIUraDI-GRNg']); } } diff --git a/app/Services/TokenService.php b/app/Services/TokenService.php index 4651b8eb..4652d30b 100644 --- a/app/Services/TokenService.php +++ b/app/Services/TokenService.php @@ -38,9 +38,6 @@ class TokenService */ public function validateToken($token) { - if (env('APP_DEBUG') == true) { - return true; - } $signer = new Sha256(); try { $token = (new Parser())->parse((string) $token);