예제 #1
0
 public function configureApplication(BaseWeblet $app)
 {
     $app['platform.endpoint'] = 'https://api.example.com';
     $app['platform.client_id'] = 123;
     $app['platform.client_secret'] = '50f4k3!';
     $app['platform.redirect_uri'] = 'http://localhost/redirect/cb';
     $app['session.test'] = true;
     parent::configureApplication($app);
     $app->enableSecurity();
     $app->enableCookieSession();
     $app->get('/test-resource', function () use($app) {
         return 'Test Resource ' . $app['platform']->get('test/endpoint')->json()['response'];
     });
 }
예제 #2
0
 public function configureApplication(Weblet $app)
 {
     parent::configureApplication($app);
     $app->enableSecurity();
 }