Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

converted symfony2 settings to symfony3. #61

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OAuth2 Server Bundle

OAuth2 Server Bundle for Symfony 2, built on the [oauth2-server-php](https://github.com/bshaffer/oauth2-server-php) library.
OAuth2 Server Bundle for Symfony 3, built on the [oauth2-server-php](https://github.com/bshaffer/oauth2-server-php) library.

[![Build Status](https://secure.travis-ci.org/bshaffer/oauth2-server-bundle.png)](http://travis-ci.org/bshaffer/oauth2-server-bundle)

Expand Down Expand Up @@ -42,7 +42,7 @@ public function tokenAction()
Use composer to add the requirement and download it by running the command:

``` bash
$ php composer.phar require bshaffer/oauth2-server-bundle
$ composer require bshaffer/oauth2-server-bundle
```

Composer will update your composer.json and install the bundle to your project's `vendor/bshaffer` directory.
Expand All @@ -69,7 +69,7 @@ public function registerBundles()
You'll need to update your schema to setup the Entities provided by this module.

``` bash
$ php app/console doctrine:schema:update --force
$ php bin/console doctrine:schema:update --force
```

### Step 4: Add routes
Expand All @@ -90,15 +90,15 @@ oauth2_server:
You'll need to setup a scope before you can create a client, use this command. The description you give here will appear on the Authorization page.

```sh
$ php app/console OAuth2:CreateScope scope (description)
$ php bin/console OAuth2:CreateScope scope (description)
```

### Step 6: Create a client

Use this console command to create a new client:

```sh
$ php app/console OAuth2:CreateClient client_id redirect_uri (grant_types) (scope)
$ php bin/console OAuth2:CreateClient client_id redirect_uri (grant_types) (scope)
```

## Optional Configuration
Expand Down Expand Up @@ -126,7 +126,7 @@ Therefore to make proper use of the user credentials grant type you'll need to m
# app/config/config.yml

parameters:
oauth2.user_provider.class: Amce\OAuth2ServerBundle\User\OAuth2UserProvider
oauth2.user_provider.class: OAuth2\ServerBundle\User\OAuth2UserProvider
```

If you want to take advantage of scope restriction on a per user basis your User entity will need to implement the `OAuth2\ServerBundle\OAuth2UserInterface` or `OAuth2\ServerBundle\AdvancedOAuth2UserInterface`.
Expand All @@ -151,7 +151,7 @@ security:
You'll need some users first though! Use the console command to create a new user:

```sh
$ php app/console OAuth2:CreateUser username password
$ php bin/console OAuth2:CreateUser username password
```

## Configuring Grant Types
Expand Down
14 changes: 7 additions & 7 deletions Resources/views/Authorize/authorize.html.twig
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<h1>Authorize</h1>

{% if scopes|length > 0 %}
<p>{{ request.client_id }} would like to access the following data:</p>
<p>{{ qs.client_id }} would like to access the following data:</p>

<ul>
{% for scope in scopes %}
<li>{{ scope }}</li>
{% endfor %}
</ul>
<ul>
{% for scope in scopes %}
<li>{{ scope }}</li>
{% endfor %}
</ul>
{% else %}
<p>{{ request.client_id }} would like to access.</p>
<p>{{ qs.client_id }} would like to access.</p>
{% endif %}

<form action="?{{ qs|url_encode }}" method="post">
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "bshaffer/oauth2-server-bundle",
"name": "alpha1125/oauth2-server-bundle",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is something expected.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right, it should not be expected. That should not be in there... "bshaffer" would be the correct one. Accidentally committed back in from testing... how do I revert that.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You just do a new commit to revert that, and push it in your branch and the PR will be updated accordingly.

"type": "symfony-bundle",
"description": "Symfony OAuth2ServerBundle",
"keywords": ["oauth", "oauth2", "security"],
"homepage": "http://github.com/bshaffer/oauth2-server-bundle",
"homepage": "http://github.com/alpha1125/oauth2-server-bundle",
"license": "MIT",
"authors": [
{
Expand Down