Skip to content

Commit

Permalink
Merge branch 'release/0.0.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
hswong3i committed Sep 10, 2014
2 parents abaf1f0 + 96263a1 commit 5fd484e
Show file tree
Hide file tree
Showing 38 changed files with 882 additions and 851 deletions.
4 changes: 2 additions & 2 deletions .sami.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
'theme' => 'enhanced',
'versions' => $versions,
'title' => 'AuthBucket\Push API',
'build_dir' => __DIR__ . '/build/push/%version%',
'cache_dir' => __DIR__ . '/build/cache/push/%version%',
'build_dir' => __DIR__ . '/build/sami/%version%',
'cache_dir' => __DIR__ . '/build/cache/sami/%version%',
'include_parent_data' => false,
'default_opened_level' => 2,
));
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ Read though [Demo](http://push-php.authbucket.com/demo) for more
information.

You may also run the demo locally. Open a console and execute the
following command to install the latest version in the push/ directory:
following command to install the latest version in the `push-php`
directory:

$ composer create-project authbucket/push-php push/ "~0.0"
$ composer create-project authbucket/push-php push-php "~0.0"

Then use the PHP built-in web server to run the demo application:

$ cd push/
$ cd push-php
$ php app/console server:run

If you get the error
Expand Down Expand Up @@ -66,7 +67,7 @@ To built the documents locally, execute the following command:

$ vendor/bin/sami.php update .sami.php

Open `build/push/index.html` with your browser for the documents.
Open `build/sami/index.html` with your browser for the documents.

Tests
-----
Expand Down
5 changes: 4 additions & 1 deletion app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use Symfony\Component\HttpFoundation\Request;

$app->register(new AuthBucket\OAuth2\Provider\AuthBucketOAuth2ServiceProvider());
$app->register(new AuthBucket\Push\Provider\AuthBucketPushServiceProvider());
$app->register(new AuthBucket\Push\Tests\TestBundle\TestBundleServiceProvider());
$app->register(new Silex\Provider\DoctrineServiceProvider());
$app->register(new Silex\Provider\FormServiceProvider());
Expand All @@ -25,6 +24,10 @@
$app->register(new Silex\Provider\UrlGeneratorServiceProvider());
$app->register(new Silex\Provider\ValidatorServiceProvider());

$provider = new AuthBucket\Push\Provider\AuthBucketPushServiceProvider();
$app->register($provider);
$app->mount('/', $provider);

require __DIR__.'/config/config_'.$app['env'].'.php';
require __DIR__.'/config/routing_'.$app['env'].'.php';

Expand Down
4 changes: 0 additions & 4 deletions app/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,3 @@
$app['twig.path'] = array(
__DIR__.'/../../tests/AuthBucket/Push/Tests/TestBundle/Resources/views',
);

// We simply reuse the user provider that already created for authorize firewall
// here.
$app['authbucket_push.user_provider'] = $app['security.user_provider.default'];
1 change: 0 additions & 1 deletion app/config/orm.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
$app['authbucket_push.model'] = array(
'device' => 'AuthBucket\\Push\\Tests\\TestBundle\\Entity\\Device',
'service' => 'AuthBucket\\Push\\Tests\\TestBundle\\Entity\\Service',
'user' => 'AuthBucket\\Push\\Tests\\TestBundle\\Entity\\User',
);

// Add model managers from ORM.
Expand Down
14 changes: 7 additions & 7 deletions app/config/security.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
return new PlaintextPasswordEncoder();
});

$app['security.user_provider.default'] = $app->share(function ($app) {
return $app['authbucket_push.model_manager.factory']->getModelManager('user');
});

$app['security.user_provider.admin'] = $app['security.user_provider.inmemory._proto'](array(
'admin' => array('ROLE_ADMIN', 'secrete'),
));
Expand All @@ -29,13 +25,17 @@
'http' => true,
'users' => $app['security.user_provider.admin'],
),
'push_device' => array(
'pattern' => '^/push/device',
'api_oauth2_debug' => array(
'pattern' => '^/api/v1.0/oauth2/debug',
'anonymous' => true,
),
'api' => array(
'pattern' => '^/api/v1.0',
'oauth2_resource' => array(
'resource_type' => 'debug_endpoint',
'scope' => array(),
'options' => array(
'debug_endpoint' => '/oauth2/debug',
'debug_endpoint' => '/api/v1.0/oauth2/debug',
'cache' => false,
),
),
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"minimum-stability": "dev",
"name": "authbucket/push-php",
"require": {
"authbucket/oauth2": "~2.1",
"authbucket/oauth2-php": "~2.2",
"guzzle/guzzle": "~3.9",
"php": ">=5.3.9",
"symfony/http-foundation": "~2.3",
Expand Down
59 changes: 0 additions & 59 deletions src/AuthBucket/Push/Controller/DeviceController.php

This file was deleted.

181 changes: 0 additions & 181 deletions src/AuthBucket/Push/Controller/ModelController.php

This file was deleted.

0 comments on commit 5fd484e

Please sign in to comment.