Skip to content

Commit

Permalink
Cleanup some docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
hswong3i committed Jul 6, 2015
1 parent 50efaa0 commit 3661fa7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -71,8 +71,8 @@ Moreover, we also provide following model
[CRUD](http://en.wikipedia.org/wiki/Create,_read,_update_and_delete)
controller for alter raw data set:

- `authbucket_oauth2.authorize_controller`: Authorize endpoint
controller.
- `authbucket_oauth2.authorize_controller`: Authorize
endpoint controller.
- `authbucket_oauth2.client_controller`: Client endpoint controller.
- `authbucket_oauth2.scope_controller`: Scope endpoint controller.

Expand Down
22 changes: 11 additions & 11 deletions tests/TestBundle/Resources/views/index.html.twig
Expand Up @@ -19,27 +19,27 @@
<a href="https://packagist.org/packages/authbucket/oauth2-php"><img src="https://poser.pugx.org/authbucket/oauth2-php/license.svg" alt="License" /></a>
</p>
<p class="lead">The primary goal of <a href="http://oauth2-php.authbucket.com/">AuthBucket\OAuth2</a> is to develop a standards compliant <a href="http://tools.ietf.org/html/rfc6749">RFC6749 OAuth2.0</a> library; secondary goal would be develop corresponding wrapper <a href="http://symfony.com">Symfony2 Bundle</a> and <a href="https://www.drupal.org">Drupal module</a>.</p>
<p>This library bundle with a <a href="http://silex.sensiolabs.org/">Silex</a> based <a href="https://github.com/authbucket/oauth2-php/blob/master/src/AuthBucket/OAuth2/Provider/AuthBucketOAuth2ServiceProvider.php">AuthBucketOAuth2ServiceProvider</a> for unit test and demo purpose. Installation and usage can refer as below.</p>
<p>This library bundle with a <a href="http://silex.sensiolabs.org/">Silex</a> based <a href="https://github.com/authbucket/oauth2-php/blob/master/src/Provider/AuthBucketOAuth2ServiceProvider.php">AuthBucketOAuth2ServiceProvider</a> for unit test and demo purpose. Installation and usage can refer as below.</p>

<h2 id="installation" class="page-header">Installation</h2>
<p class="lead">Simply add a dependency on <code>authbucket/oauth2-php</code> to your project's <code>composer.json</code> file if you use <a href="http://getcomposer.org/">Composer</a> to manage the dependencies of your project.</p>
<p>Here is a minimal example of a <code>composer.json</code>:</p>
<pre><code class="json">{
&quot;require&quot;: {
&quot;authbucket/oauth2-php&quot;: &quot;~2.4&quot;
&quot;authbucket/oauth2-php&quot;: &quot;~3.0&quot;
}
}</code></pre>

<h3 id="parameters">Parameters</h3>
<p>The bundled <a href="https://github.com/authbucket/oauth2-php/blob/master/src/AuthBucket/OAuth2/Provider/AuthBucketOAuth2ServiceProvider.php">AuthBucketOAuth2ServiceProvider</a> come with following parameters:</p>
<p>The bundled <a href="https://github.com/authbucket/oauth2-php/blob/master/src/Provider/AuthBucketOAuth2ServiceProvider.php">AuthBucketOAuth2ServiceProvider</a> come with following parameters:</p>
<ul>
<li><code>authbucket_oauth2.model</code>: (Optional) Override this with your own model classes, default with in-memory AccessToken for using resource firewall with remote debug endpoint.</li>
<li><code>authbucket_oauth2.model_manager.factory</code>: (Optional) Override this with your backend model managers, e.g. Doctrine ORM EntityRepository, default with in-memory implementation for using resource firewall with remote debug endpoint.</li>
<li><code>authbucket_oauth2.user_provider</code>: (Optional) For using <code>grant_type = password</code>, override this parameter with your own user provider, e.g. using InMemoryUserProvider or a Doctrine ORM EntityRepository that implements UserProviderInterface.</li>
</ul>

<h3 id="services">Services</h3>
<p>The bundled <a href="https://github.com/authbucket/oauth2-php/blob/master/src/AuthBucket/OAuth2/Provider/AuthBucketOAuth2ServiceProvider.php">AuthBucketOAuth2ServiceProvider</a> come with following services controller which simplify the OAuth2.0 controller implementation overhead:</p>
<p>The bundled <a href="https://github.com/authbucket/oauth2-php/blob/master/src/Provider/AuthBucketOAuth2ServiceProvider.php">AuthBucketOAuth2ServiceProvider</a> come with following services controller which simplify the OAuth2.0 controller implementation overhead:</p>
<ul>
<li><code>authbucket_oauth2.oauth2_controller</code>: OAuth2 endpoint controller.</li>
</ul>
Expand All @@ -51,7 +51,7 @@
</ul>

<h3 id="registering">Registering</h3>
<p>If you are using <a href="http://silex.sensiolabs.org/">Silex</a>, register <a href="https://github.com/authbucket/oauth2-php/blob/master/src/AuthBucket/OAuth2/Provider/AuthBucketOAuth2ServiceProvider.php">AuthBucketOAuth2ServiceProvider</a> as below:</p>
<p>If you are using <a href="http://silex.sensiolabs.org/">Silex</a>, register <a href="https://github.com/authbucket/oauth2-php/blob/master/src/Provider/AuthBucketOAuth2ServiceProvider.php">AuthBucketOAuth2ServiceProvider</a> as below:</p>
<pre><code class="php">$app-&gt;register(new AuthBucket\OAuth2\Provider\AuthBucketOAuth2ServiceProvider());</code></pre>
<p>Moreover, enable following service providers if that's not already the case:</p>
<pre><code class="php">$app-&gt;register(new Silex\Provider\SecurityServiceProvider());
Expand Down Expand Up @@ -139,26 +139,26 @@ $app[&#39;security.firewalls&#39;] = array(
);</code></pre>

<h2 id="demo" class="page-header">Demo</h2>
<p class="lead">The demo is based on <a href="http://silex.sensiolabs.org/">Silex</a> and <a href="https://github.com/authbucket/oauth2-php/blob/master/src/AuthBucket/OAuth2/Provider/AuthBucketOAuth2ServiceProvider.php">AuthBucketOAuth2ServiceProvider</a>. Read though <a href="http://oauth2-php.authbucket.com/demo">Demo</a> for more information.</p>
<p class="lead">The demo is based on <a href="http://silex.sensiolabs.org/">Silex</a> and <a href="https://github.com/authbucket/oauth2-php/blob/master/src/Provider/AuthBucketOAuth2ServiceProvider.php">AuthBucketOAuth2ServiceProvider</a>. Read though <a href="http://oauth2-php.authbucket.com/demo">Demo</a> for more information.</p>
<p>You may also run the demo locally. Open a console and execute the following command to install the latest version in the <code>oauth2-php</code> directory:</p>
<pre><code class="bash">$ composer create-project authbucket/oauth2-php oauth2-php &quot;~2.4&quot;</code></pre>
<pre><code class="bash">$ composer create-project authbucket/oauth2-php oauth2-php &quot;~3.0&quot;</code></pre>
<p>Then use the PHP built-in web server to run the demo application:</p>
<pre><code class="bash">$ cd oauth2-php
$ php app/console server:run</code></pre>
$ ./app/console server:run</code></pre>
<p>If you get the error <code>There are no commands defined in the &quot;server&quot; namespace.</code>, then you are probably using PHP 5.3. That's ok! But the built-in web server is only available for PHP 5.4.0 or higher. If you have an older version of PHP or if you prefer a traditional web server such as Apache or Nginx, read the <a href="http://silex.sensiolabs.org/doc/web_servers.html">Configuring a web server</a> article.</p>
<p>Open your browser and access the <a href="http://127.0.0.1:8000">http://127.0.0.1:8000</a> URL to see the Welcome page of demo application.</p>
<p>Also access <a href="http://127.0.0.1:8000/admin/refresh_database">http://127.0.0.1:8000/admin/refresh_database</a> to initialize the bundled SQLite database with user account <code>admin</code>:<code>secrete</code>.</p>

<h2 id="documentation" class="page-header">Documentation</h2>
<p class="lead">OAuth2's documentation is built with <a href="https://github.com/fabpot/Sami">Sami</a> and publicly hosted on <a href="http://authbucket.github.io/oauth2-php">GitHub Pages</a>.</p>
<p>To built the documents locally, execute the following command:</p>
<pre><code class="bash">$ vendor/bin/sami.php update .sami.php</code></pre>
<pre><code class="bash">$ composer sami</code></pre>
<p>Open <code>build/sami/index.html</code> with your browser for the documents.</p>

<h2 id="tests" class="page-header">Tests</h2>
<p class="lead">This project is coverage with <a href="http://phpunit.de/">PHPUnit</a> test cases; CI result can be found from <a href="https://travis-ci.org/authbucket/oauth2-php">Travis CI</a>; code coverage report can be found from <a href="https://coveralls.io/r/authbucket/oauth2-php">Coveralls</a>.</p>
<p>To run the test suite locally, execute the following command:</p>
<pre><code class="bash">$ vendor/bin/phpunit</code></pre>
<pre><code class="bash">$ composer phpunit</code></pre>
<p>Open <code>build/logs/html</code> with your browser for the coverage report.</p>

<h2 id="references" class="page-header">References</h2>
Expand All @@ -175,7 +175,7 @@ $ php app/console server:run</code></pre>
<h2 id="license" class="page-header">License</h2>
<ul>
<li>Code released under <a href="https://github.com/authbucket/oauth2-php/blob/master/LICENSE">MIT</a></li>
<li>Docs released under <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">CC BY-NC-SA 3.0</a></li>
<li>Docs released under <a href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></li>
</ul>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion tests/TestBundle/Resources/views/page_bottom.html.twig
Expand Up @@ -7,7 +7,7 @@
<li><a href="https://twitter.com/share" class="twitter-share-button" data-url="http://oauth2-php.authbucket.com/" data-via="authbucket">Tweet</a></li>
</ul>
<p>Design and built with all the love in the world by <a href="http://twitter.com/hswong3i">@hswong3i</a>.</p>
<p>Code released under <a href="https://github.com/authbucket/oauth2-php/blob/master/LICENSE">MIT</a>. Docs released under <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">CC BY-NC-SA 3.0</a>.</p>
<p>Code released under <a href="https://github.com/authbucket/oauth2-php/blob/master/LICENSE">MIT</a>. Docs released under <a href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.</p>
<ul class="list-inline">
<li><a href="https://github.com/authbucket/oauth2-php">GitHub</a></li>
<li>·</li>
Expand Down

0 comments on commit 3661fa7

Please sign in to comment.