Skip to content

Commit 1588874

Browse files
committed
Initial commit
0 parents  commit 1588874

File tree

84 files changed

+6102
-0
lines changed

Some content is hidden

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

84 files changed

+6102
-0
lines changed

.gitattributes

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
* text=auto
2+
3+
/docs export-ignore
4+
/tests export-ignore
5+
/.gitattributes export-ignore
6+
/.gitignore export-ignore
7+
/.travis.yml export-ignore
8+
/.scrutinizer.yml export-ignore
9+
/phpunit.xml.dist export-ignore
10+
/phpspec.xml.dist export-ignore
11+
/CHANGELOG.md export-ignore
12+
/CONTRIBUTING.md export-ignore
13+
/README.md export-ignore

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
composer.lock
2+
phpunit.xml
3+
phpspec.yml
4+
vendor

.scrutinizer.yml

+163
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
filter:
2+
paths:
3+
- 'app/*'
4+
- 'src/*'
5+
excluded_paths:
6+
- 'bootstrap/*'
7+
- 'config/*'
8+
- 'public/*'
9+
- 'resources/*'
10+
- 'vendor/*'
11+
- 'views/*'
12+
tools:
13+
php_analyzer: true
14+
php_mess_detector: true
15+
php_changetracking: true
16+
php_code_sniffer:
17+
config:
18+
standard: PSR2
19+
php_loc:
20+
excluded_dirs:
21+
- vendor
22+
php_pdepend:
23+
excluded_dirs:
24+
- vendor
25+
- tests
26+
external_code_coverage:
27+
timeout: '3600'
28+
runs: 3
29+
30+
checks:
31+
php:
32+
code_rating: true
33+
duplication: true
34+
variable_existence: true
35+
useless_calls: true
36+
use_statement_alias_conflict: true
37+
unused_variables: true
38+
unused_properties: true
39+
unused_parameters: true
40+
unused_methods: true
41+
unreachable_code: true
42+
sql_injection_vulnerabilities: true
43+
security_vulnerabilities: true
44+
precedence_mistakes: true
45+
precedence_in_conditions: true
46+
parameter_non_unique: true
47+
no_property_on_interface: true
48+
no_non_implemented_abstract_methods: true
49+
deprecated_code_usage: true
50+
closure_use_not_conflicting: true
51+
closure_use_modifiable: true
52+
avoid_useless_overridden_methods: true
53+
avoid_conflicting_incrementers: true
54+
assignment_of_null_return: true
55+
verify_property_names: true
56+
verify_argument_usable_as_reference: true
57+
verify_access_scope_valid: true
58+
use_self_instead_of_fqcn: true
59+
too_many_arguments: true
60+
symfony_request_injection: true
61+
switch_fallthrough_commented: true
62+
spacing_of_function_arguments: true
63+
spacing_around_non_conditional_operators: true
64+
spacing_around_conditional_operators: true
65+
space_after_cast: true
66+
single_namespace_per_use: true
67+
simplify_boolean_return: true
68+
scope_indentation:
69+
spaces_per_level: '4'
70+
return_doc_comments: true
71+
require_scope_for_properties: true
72+
require_scope_for_methods: true
73+
require_php_tag_first: true
74+
require_braces_around_control_structures: true
75+
remove_trailing_whitespace: true
76+
remove_php_closing_tag: true
77+
remove_extra_empty_lines: true
78+
psr2_switch_declaration: true
79+
psr2_control_structure_declaration: true
80+
psr2_class_declaration: true
81+
property_assignments: true
82+
properties_in_camelcaps: true
83+
prefer_while_loop_over_for_loop: true
84+
phpunit_assertions: true
85+
php5_style_constructor: true
86+
parameters_in_camelcaps: true
87+
parameter_doc_comments: true
88+
return_doc_comment_if_not_inferrable: true
89+
param_doc_comment_if_not_inferrable: true
90+
overriding_private_members: true
91+
optional_parameters_at_the_end: true
92+
one_class_per_file: true
93+
non_commented_empty_catch_block: true
94+
no_unnecessary_if: true
95+
no_unnecessary_function_call_in_for_loop: true
96+
no_unnecessary_final_modifier: true
97+
no_underscore_prefix_in_properties: true
98+
no_underscore_prefix_in_methods: true
99+
no_trailing_whitespace: true
100+
no_space_inside_cast_operator: true
101+
no_space_before_semicolon: true
102+
no_space_around_object_operator: true
103+
no_goto: true
104+
no_global_keyword: true
105+
no_exit: true
106+
no_empty_statements: true
107+
no_else_if_statements: true
108+
no_duplicate_arguments: true
109+
no_debug_code: true
110+
no_commented_out_code: true
111+
newline_at_end_of_file: true
112+
naming_conventions:
113+
local_variable: '^[a-z][a-zA-Z0-9]*$'
114+
abstract_class_name: ^Abstract|Factory$
115+
utility_class_name: 'Utils?$'
116+
constant_name: '^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$'
117+
property_name: '^[a-z][a-zA-Z0-9]*$'
118+
method_name: '^(?:[a-z]|__)[a-zA-Z0-9]*$'
119+
parameter_name: '^[a-z][a-zA-Z0-9]*$'
120+
interface_name: '^[A-Z][a-zA-Z0-9]*Interface$'
121+
type_name: '^[A-Z][a-zA-Z0-9]*$'
122+
exception_name: '^[A-Z][a-zA-Z0-9]*Exception$'
123+
isser_method_name: '^(?:is|has|should|may|supports|was)'
124+
lowercase_php_keywords: true
125+
more_specific_types_in_doc_comments: true
126+
missing_arguments: true
127+
method_calls_on_non_object: true
128+
line_length:
129+
max_length: '120'
130+
lowercase_basic_constants: true
131+
instanceof_class_exists: true
132+
function_in_camel_caps: true
133+
function_body_start_on_new_line: true
134+
fix_use_statements:
135+
remove_unused: true
136+
preserve_multiple: false
137+
preserve_blanklines: false
138+
order_alphabetically: true
139+
foreach_traversable: true
140+
foreach_usable_as_reference: true
141+
fix_php_opening_tag: true
142+
fix_line_ending: true
143+
fix_identation_4spaces: true
144+
fix_doc_comments: true
145+
ensure_lower_case_builtin_functions: true
146+
encourage_postdec_operator: true
147+
classes_in_camel_caps: true
148+
catch_class_exists: true
149+
blank_line_after_namespace_declaration: true
150+
avoid_usage_of_logical_operators: true
151+
avoid_unnecessary_concatenation: true
152+
avoid_tab_indentation: true
153+
avoid_superglobals: true
154+
avoid_perl_style_comments: true
155+
avoid_multiple_statements_on_same_line: true
156+
avoid_fixme_comments: true
157+
avoid_length_functions_in_loops: true
158+
avoid_entity_manager_injection: true
159+
avoid_duplicate_types: true
160+
avoid_corrupting_byteorder_marks: true
161+
argument_type_checks: true
162+
avoid_aliased_php_functions: true
163+
deadlock_detection_in_loops: true

.travis.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
language: php
2+
3+
php:
4+
- 5.5.9
5+
- 5.5
6+
- 5.6
7+
- 7.0
8+
- 7.1
9+
- hhvm
10+
11+
sudo: false
12+
13+
install:
14+
- travis_retry composer install --no-interaction --prefer-source
15+
16+
script:
17+
- 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
18+
- 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
19+
20+
after_script:
21+
- 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
22+
- 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

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# CHANGELOG
2+
3+
# 5.2.0 (released 2016-08-10)
4+
5+
- Add Laravel 5.3 support
6+
7+
# 5.1.4 (released 2016-01-29)
8+
9+
- Fix bug in middleware
10+
11+
# 5.1.3 (released 2016-01-13)
12+
13+
- Fix Lumen 5.2 support
14+
15+
## 5.1.2 (released 2016-01-13)
16+
17+
- Fix Lumen 5.2 support bug
18+
19+
## 5.1.1 (released 2015-12-22)
20+
21+
- Fix Laravel 5.2 support bug
22+
23+
## 5.1.0 (released 2015-11-15)
24+
25+
- Added Laravel 5.2 support
26+
27+
## 5.0.3 (released 2015-11-02)
28+
29+
- Added new access token exception
30+
31+
## 5.0.2 (released 2015-10-12)
32+
33+
- Improved Lumen support
34+
35+
## 5.0.1 (released 2015-08-19)
36+
37+
- Added middleware registration
38+
39+
## 5.0.0 (released 2015-08-06)
40+
41+
- Added middlewares
42+
- Added changelog
43+
- Added PHP CS Fixer file
44+
- Added StyleCI support
45+
- Updated and simplified migrations
46+
- Updated project structure
47+
- Updated contribution guidelines
48+
- Removed deprecated filters
49+
50+
## 4.0.2 (released 2015-05-20)
51+
52+
- Removed relaxed Laravel 5 support
53+
54+
## 4.0.1 (released 2015-05-19)
55+
56+
- Relaxed the composer.json file to allow L5.1 support
57+
58+
## 4.0.0 (released 2015-04-21)
59+
60+
- Laravel 5.0.* support
61+
- Removed create-client command

CONTRIBUTING.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# CONTRIBUTING
2+
3+
Contributions are welcome, and are accepted via pull requests. Please review these guidelines before submitting any pull requests.
4+
5+
## Guidelines
6+
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 behavior, 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](https://git-scm.com/book/en/Git-Tools-Rewriting-History) them before submitting.
11+
* You may also need to [rebase](https://git-scm.com/book/en/Git-Branching-Rebasing) to avoid merge conflicts.
12+
13+
## Running Tests
14+
15+
You will need an install of [Composer](https://getcomposer.org) before continuing.
16+
17+
First, install the dependencies:
18+
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

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
MIT License
2+
3+
Copyright (C) 2014-2016 Luca Degasperi <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
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.

README.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# OAuth 2.0 Server for Laravel (deprecated for Laravel 5.3+)
2+
3+
![oauth2-server-laravel](https://cloud.githubusercontent.com/assets/499192/9065550/751404ba-3ad2-11e5-9f92-3d4d5d4b9c54.png)
4+
5+
> **Note:** This package is no longer maintaned for Laravel 5.3+ since Laravel now features the [Passport package](https://laravel.com/docs/passport).
6+
7+
[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.
8+
9+
[![Latest Version](http://img.shields.io/github/release/lucadegasperi/oauth2-server-laravel.svg?style=flat-square)](https://github.com/lucadegasperi/oauth2-server-laravel/releases)
10+
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
11+
[![Build Status](https://img.shields.io/travis/lucadegasperi/oauth2-server-laravel/master.svg?style=flat-square)](https://travis-ci.org/lucadegasperi/oauth2-server-laravel)
12+
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/lucadegasperi/oauth2-server-laravel/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/lucadegasperi/oauth2-server-laravel/code-structure)
13+
[![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)
14+
[![Total Downloads](https://img.shields.io/packagist/dt/lucadegasperi/oauth2-server-laravel.svg?style=flat-square)](https://packagist.org/packages/lucadegasperi/oauth2-server-laravel)
15+
16+
> **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).
17+
18+
## Version Compatibility
19+
20+
Laravel | OAuth Server | PHP
21+
:---------|:-------------|:----
22+
4.0.x | 1.0.x |>= 5.3
23+
4.1.x | 1.0.x |>= 5.3
24+
4.2.x | 3.0.x |>= 5.4
25+
5.0.x | 4.0.x |>= 5.4
26+
5.1.x | 5.0.x |>= 5.5.9
27+
5.2.x | 5.1.x |>= 5.5.9
28+
29+
## Documentation
30+
31+
This package features an [extensive documentation](docs#readme) to help you getting started implementing an OAuth 2.0 server in your Laravel application.
32+
33+
## Contributing
34+
35+
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.
36+
37+
## Credits
38+
39+
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).
40+
41+
## License
42+
43+
The Laravel OAuth 2.0 package is released under [the MIT License](LICENSE).

0 commit comments

Comments
 (0)