Skip to content

Commit b8b6312

Browse files
committed
Merge branch 'develop'
* develop: (54 commits) Update changelog Remove PHP from title Add notice about lumen Update description Add hero image Add gittattributes for lower download size Add new contributing guidelines Add note about contribution guideline Update OAuth2 package link Add note Fix typos in readme Move license to bottom Autoload files Set authorizer request in middleware Rename middlewares Cleanup code Add OAuthClientMiddleware Delete OAuthOwnerMiddleware Add OAuthUserMiddleware Drop filter tests ...
2 parents b0b30cc + 1d0725e commit b8b6312

File tree

83 files changed

+2053
-1300
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+2053
-1300
lines changed

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/tests export-ignore
2+
/.gitattributes export-ignore
3+
/.gitignore export-ignore
4+
/.travis.yml export-ignore
5+
/.scrutinizer.yml export-ignore
6+
/.php_cs export-ignore
7+
/phpunit.xml.dist export-ignore
8+
/phpspec.xml.dist export-ignore
9+
/CHANGELOG.md export-ignore
10+
/CONTRIBUTING.md export-ignore
11+
/README.md export-ignore

.gitignore

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
/vendor
2-
composer.phar
3-
.DS_Store
4-
/.idea/
51
composer.lock
2+
phpunit.xml
3+
phpspec.yml
4+
vendor

.php_cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
$header = <<<EOF
4+
This file is part of OAuth 2.0 Laravel.
5+
6+
(c) Luca Degasperi <[email protected]>
7+
8+
For the full copyright and license information, please view the LICENSE
9+
file that was distributed with this source code.
10+
EOF;
11+
12+
Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($header);
13+
14+
$finder = Symfony\CS\Finder\DefaultFinder::create()
15+
->in(__DIR__);
16+
17+
return Symfony\CS\Config\Config::create()
18+
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
19+
->fixers([
20+
'short_array_syntax',
21+
'header_comment',
22+
'-psr0'
23+
])
24+
->finder($finder);

.travis.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
language: php
22

33
php:
4-
- 5.4
4+
- 5.5.9
55
- 5.5
66
- 5.6
7+
- 7.0
78
- hhvm
89

910
matrix:
11+
fast_finish: true
1012
allow_failures:
11-
- php: hhvm
13+
- php: 7.0
1214

13-
before_script:
14-
- curl -s http://getcomposer.org/installer | php
15-
- php composer.phar install --dev --no-interaction
16-
- wget https://scrutinizer-ci.com/ocular.phar
17-
- wget https://phar.phpunit.de/phpcov.phar
15+
sudo: false
16+
17+
install:
18+
- travis_retry composer install --no-interaction --prefer-source
19+
1820
script:
19-
- mkdir -p tmp
20-
- vendor/bin/phpspec run -c phpspec.yml.dist
21-
- vendor/bin/phpunit --configuration phpunit.xml.dist
22-
after_script:
23-
- php phpcov.phar merge --clover tmp/coverage.clover tmp
24-
- php ocular.phar code-coverage:upload --format=php-clover tmp/coverage.clover
21+
- if [ "$TRAVIS_PHP_VERSION" != "5.5.9" ] && [ "$TRAVIS_PHP_VERSION" != "5.5" ] && [ "$TRAVIS_PHP_VERSION" != "5.6" ]; then vendor/bin/phpunit; vendor/bin/phpspec run; fi
22+
- if [ "$TRAVIS_PHP_VERSION" == "5.5.9" ] || [ "$TRAVIS_PHP_VERSION" == "5.5" ] || [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; fi
2523

26-
cache:
27-
directories:
28-
- vendor
24+
after_script:
25+
- if [ "$TRAVIS_PHP_VERSION" == "5.5.9" ] || [ "$TRAVIS_PHP_VERSION" == "5.5" ] || [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
26+
- if [ "$TRAVIS_PHP_VERSION" == "5.5.9" ] || [ "$TRAVIS_PHP_VERSION" == "5.5" ] || [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# CHANGELOG
2+
3+
## 5.0.0 (upcoming)
4+
5+
- Added middlewares
6+
- Added changelog
7+
- Added PHP CS Fixer file
8+
- Added StyleCI support
9+
- Updated and simplified migrations
10+
- Updated project structure
11+
- Updated contribution guidelines
12+
- Removed deprecated filters
13+
14+
## 4.0.2 (released 2015-05-20)
15+
16+
- Removed relaxed Laravel 5 support
17+
18+
## 4.0.1 (released 2015-05-19)
19+
20+
- Relaxed the composer.json file to allow L5.1 support
21+
22+
## 4.0.0 (released 2015-04-21)
23+
24+
- Laravel 5.0.* support
25+
- Removed create-client command

CONTRIBUTING.md

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,31 @@
1-
Thanks for contributing to this project.
1+
# CONTRIBUTING
22

3-
Everytime you open an issue please state which version of Laravel are you using and which version of this package are you using.
4-
This is very important so that problems can be issued quicker.
3+
Contributions are welcome, and are accepted via pull requests. Please review these guidelines before submitting any pull requests.
54

5+
## Guidelines
66

7-
Please ensure that you run `phpunit` from the project root after you've made any changes.
7+
* Please follow the [PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) and [PHP-FIG Naming Conventions](https://github.com/php-fig/fig-standards/blob/master/bylaws/002-psr-naming-conventions.md).
8+
* Ensure that the current tests pass, and if you've added something new, add the tests where relevant.
9+
* Remember that we follow [SemVer](http://semver.org). If you are changing the behaviour, or the public api, you may need to update the docs.
10+
* Send a coherent commit history, making sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash](http://git-scm.com/book/en/Git-Tools-Rewriting-History) them before submitting.
11+
* You may also need to [rebase](http://git-scm.com/book/en/Git-Branching-Rebasing) to avoid merge conflicts.
812

9-
If you've added something new please create a new unit test, if you've changed something please update any unit tests as appropriate.
13+
## Running Tests
1014

11-
We're trying to ensure there is **100%** test code coverage (including testing PHP errors and exceptions) so please ensure any new/updated tests cover all of your changes.
15+
You will need an install of [Composer](https://getcomposer.org) before continuing.
1216

13-
Thank you,
17+
First, install the dependencies:
1418

15-
@lucadegasperi
19+
```bash
20+
$ composer install
21+
```
22+
23+
Then run phpunit:
24+
25+
```bash
26+
$ vendor/bin/phpunit
27+
```
28+
29+
If the test suite passes on your local machine you should be good to go.
30+
31+
When you make a pull request, the tests will automatically be run again by [Travis CI](https://travis-ci.org/) on multiple php versions and hhvm.

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (C) 2014 Luca Degasperi
3+
Copyright (C) 2014-2015 Luca Degasperi <[email protected]>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in
@@ -17,4 +17,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
1717
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
1818
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
1919
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# PHP OAuth 2.0 Server for Laravel
1+
# OAuth 2.0 Server for Laravel
2+
3+
![oauth2-server-laravel](https://cloud.githubusercontent.com/assets/499192/9065550/751404ba-3ad2-11e5-9f92-3d4d5d4b9c54.png)
4+
5+
[OAuth 2.0](http://tools.ietf.org/wg/oauth/draft-ietf-oauth-v2/) authorization server and resource server for the Laravel and Lumen frameworks. Standard compliant thanks to the amazing work by [The League of Extraordinary Packages](http://www.thephpleague.com) OAuth 2.0 authorization server and resource server.
26

37
[![Latest Version](http://img.shields.io/github/release/lucadegasperi/oauth2-server-laravel.svg?style=flat-square)](https://github.com/lucadegasperi/oauth2-server-laravel/releases)
48
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
@@ -7,32 +11,30 @@
711
[![Quality Score](https://img.shields.io/scrutinizer/g/lucadegasperi/oauth2-server-laravel/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/lucadegasperi/oauth2-server-laravel)
812
[![Total Downloads](https://img.shields.io/packagist/dt/lucadegasperi/oauth2-server-laravel.svg?style=flat-square)](https://packagist.org/packages/lucadegasperi/oauth2-server-laravel)
913

10-
[OAuth 2.0](http://tools.ietf.org/wg/oauth/draft-ietf-oauth-v2/) authorization server and resource server for the Laravel framework. Standard compliant thanks to the amazing work by [The League of Extraordinary Packages](http://www.thephpleague.com) OAuth 2.0 authorization server and resource server.
11-
12-
The package assumes you have a good-enough knowledge of the principles behind the [OAuth 2.0 Specification](http://tools.ietf.org/html/rfc6749).
14+
> **Note:** This package assumes you have a good-enough knowledge of the principles behind the [OAuth 2.0 authorization specification](http://tools.ietf.org/html/rfc6749).
1315
14-
## Version Compability
16+
## Version Compatibility
1517

1618
Laravel | OAuth Server | PHP
1719
:---------|:-------------|:----
1820
4.0.x | 1.0.x |>= 5.3
1921
4.1.x | 1.0.x |>= 5.3
2022
4.2.x | 3.0.x |>= 5.4
2123
5.0.x | 4.0.x |>= 5.4
22-
5.1.x | 4.1.x |>= 5.5
24+
5.1.x | 5.0.x |>= 5.5.9
2325

2426
## Documentation
2527

26-
This package features an [extensive wiki](https://github.com/lucadegasperi/oauth2-server-laravel/wiki) to help you getting started implementing an OAuth 2.0 Server in your Laravel app.
28+
This package features an [extensive wiki](https://github.com/lucadegasperi/oauth2-server-laravel/wiki) to help you getting started implementing an OAuth 2.0 server in your Laravel application.
2729

2830
## Support
2931

30-
Bugs and feature request are tracked on [GitHub](https://github.com/lucadegasperi/oauth2-server-laravel/issues)
32+
Bugs and feature request are tracked on [GitHub](https://github.com/lucadegasperi/oauth2-server-laravel/issues). Please read our [contribution guidelines](CONTRIBUTING.md) before opening a new issue or submitting a new pull request.
3133

32-
## License
34+
## Credits
3335

34-
This package is released under [the MIT License](LICENSE).
36+
The code on which this package is [based](https://github.com/thephpleague/oauth2-server), is principally developed and maintained by [Alex Bilbie](https://twitter.com/alexbilbie).
3537

36-
## Credits
38+
## License
3739

38-
The code on which this package is [based](https://github.com/php-loep/oauth2-server/), is principally developed and maintained by [Alex Bilbie](https://twitter.com/alexbilbie).
40+
This package is released under [the MIT License](LICENSE).

behat.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

composer.json

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,26 @@
11
{
22
"name": "lucadegasperi/oauth2-server-laravel",
3-
"description": "Laravel wrapper for the OAuth 2.0 Server package league/oauth2-server.",
4-
"keywords": [
5-
"laravel",
6-
"oauth2",
7-
"oauth",
8-
"server",
9-
"api"
10-
],
3+
"description": "A OAuth 2.0 bridge for Laravel and Lumen",
4+
"keywords": ["oauth2", "oauth", "server", "api", "laravel", "lumen"],
5+
"license": "MIT",
116
"authors": [
127
{
138
"name": "Luca Degasperi",
149
"email": "[email protected]"
1510
}
1611
],
1712
"require": {
18-
"php": ">=5.4.0",
19-
"illuminate/database": "5.0.*|5.1.*",
20-
"illuminate/console": "5.0.*|5.1.*",
21-
"illuminate/contracts": "5.0.*|5.1.*",
22-
"illuminate/http": "5.0.*|5.1.*",
23-
"illuminate/support": "5.0.*|5.1.*",
24-
"illuminate/config": "5.0.*|5.1.*",
13+
"php": ">=5.5.9",
14+
"illuminate/database": "5.1.*",
15+
"illuminate/console": "5.1.*",
16+
"illuminate/contracts": "5.1.*",
17+
"illuminate/http": "5.1.*",
18+
"illuminate/support": "5.1.*",
19+
"illuminate/config": "5.1.*",
2520
"league/oauth2-server": "4.1.*"
2621
},
2722
"require-dev": {
28-
"orchestra/testbench": "3.1.*@dev",
23+
"orchestra/testbench": "3.1.*",
2924
"phpunit/phpunit": "~4.0",
3025
"phpspec/phpspec": "~2.0",
3126
"mockery/mockery": "~0.9",
@@ -34,18 +29,25 @@
3429
"autoload": {
3530
"psr-4": {
3631
"LucaDegasperi\\OAuth2Server\\": "src"
32+
}
33+
},
34+
"autoload-dev": {
35+
"psr-4": {
36+
"LucaDegasperi\\OAuth2Server\\Tests\\": "tests"
3737
},
3838
"classmap": [
39-
"seeds",
40-
"tests/TestCase.php",
41-
"tests/integration/DBTestCase.php"
39+
"database"
40+
],
41+
"files": [
42+
"tests/AbstractTestCase.php",
43+
"tests/integration/AbstractDBTestCase.php"
4244
]
4345
},
4446
"extra": {
4547
"branch-alias": {
46-
"dev-master": "4.1-dev"
48+
"dev-develop": "5.0-dev"
4749
}
4850
},
4951
"minimum-stability": "dev",
50-
"license": "MIT"
52+
"prefer-stable": true
5153
}

0 commit comments

Comments
 (0)