Move syndication targets to a config file, fixes #27, also more dynamically generate micropub token

This commit is contained in:
Jonny Barnes 2016-12-08 14:28:42 +00:00
parent 42841eca08
commit e12b4d39ef
7 changed files with 107 additions and 60 deletions

View file

@ -5,6 +5,7 @@ namespace App\Providers;
use App\Tag;
use App\Note;
use Validator;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
@ -48,8 +49,10 @@ class AppServiceProvider extends ServiceProvider
//allow micropub use in development
if (env('APP_DEBUG') == true) {
session(['me' => 'https://jonnybarnes.localhost']);
session(['token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtZSI6Imh0dHBzOlwvXC9qb25ueWJhcm5lcy5sb2NhbGhvc3QiLCJjbGllbnRfaWQiOiJodHRwczpcL1wvam9ubnliYXJuZXMubG9jYWxob3N0XC9ub3Rlc1wvbmV3Iiwic2NvcGUiOiJwb3N0IiwiZGF0ZV9pc3N1ZWQiOjE0ODA1ODg2MTYsIm5vbmNlIjoiMTIyOGZlOThjMjFmNTc4OCJ9.xNxViQaFkNaDXIH5gAZiG-GkLeYC-fQq-puHkBSesw0']);
session(['me' => env('APP_URL')]);
if (Storage::exists('dev-token')) {
session(['token' => Storage::get('dev-token')]);
}
}
}