-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added files from league/oauth2-server with customized Session files
- Loading branch information
0 parents
commit c943895
Showing
70 changed files
with
6,208 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
tests/ export-ignore | ||
phpunit.xml export-ignore | ||
build.xml export-ignore | ||
test export-ignore | ||
.travis.yml export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/vendor | ||
/composer.lock | ||
/build | ||
/docs | ||
/testing | ||
/examples/relational/vendor | ||
/examples/relational/config/oauth2.sqlite3 | ||
/examples/nosql/vendor | ||
/examples/nosql/config/oauth2.sqlite3 | ||
/examples/relational/composer.lock | ||
/tests/codecept/tests/_log | ||
oauth2-server.paw | ||
/output_*/ | ||
/_site | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
filter: | ||
excluded_paths: | ||
- tests/* | ||
- vendor/* | ||
- examples/* | ||
checks: | ||
php: | ||
code_rating: true | ||
remove_extra_empty_lines: true | ||
remove_php_closing_tag: true | ||
remove_trailing_whitespace: true | ||
fix_use_statements: | ||
remove_unused: true | ||
preserve_multiple: false | ||
preserve_blanklines: true | ||
order_alphabetically: true | ||
fix_php_opening_tag: true | ||
fix_linefeed: true | ||
fix_line_ending: true | ||
fix_identation_4spaces: true | ||
fix_doc_comments: true | ||
tools: | ||
external_code_coverage: | ||
timeout: 1800 | ||
php_code_coverage: false | ||
php_code_sniffer: | ||
config: | ||
standard: PSR2 | ||
filter: | ||
paths: ['src'] | ||
php_loc: | ||
enabled: true | ||
excluded_dirs: [vendor, tests, examples] | ||
php_cpd: | ||
enabled: true | ||
excluded_dirs: [vendor, tests, examples] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,205 @@ | ||
# Changelog | ||
|
||
## 4.1.6 (released 2016-09-13) | ||
|
||
* Less restrictive on Authorization header check (Issue #652) | ||
|
||
## 4.1.5 (released 2016-01-04) | ||
|
||
* Enable Symfony 3.0 support (#412) | ||
|
||
## 4.1.4 (released 2015-11-13) | ||
|
||
* Fix for determining access token in header (Issue #328) | ||
* Refresh tokens are now returned for MAC responses (Issue #356) | ||
* Added integration list to readme (Issue #341) | ||
* Expose parameter passed to exceptions (Issue #345) | ||
* Removed duplicate routing setup code (Issue #346) | ||
* Docs fix (Issues #347, #360, #380) | ||
* Examples fix (Issues #348, #358) | ||
* Fix typo in docblock (Issue #352) | ||
* Improved timeouts for MAC tokens (Issue #364) | ||
* `hash_hmac()` should output raw binary data, not hexits (Issue #370) | ||
* Improved regex for matching all Base64 characters (Issue #371) | ||
* Fix incorrect signature parameter (Issue #372) | ||
* AuthCodeGrant and RefreshTokenGrant don't require client_secret (Issue #377) | ||
* Added priority argument to event listener (Issue #388) | ||
|
||
## 4.1.3 (released 2015-03-22) | ||
|
||
* Docblock, namespace and inconsistency fixes (Issue #303) | ||
* Docblock type fix (Issue #310) | ||
* Example bug fix (Issue #300) | ||
* Updated league/event to ~2.1 (Issue #311) | ||
* Fixed missing session scope (Issue #319) | ||
* Updated interface docs (Issue #323) | ||
* `.travis.yml` updates | ||
|
||
## 4.1.2 (released 2015-01-01) | ||
|
||
* Remove side-effects in hash_equals() implementation (Issue #290) | ||
|
||
## 4.1.1 (released 2014-12-31) | ||
|
||
* Changed `symfony/http-foundation` dependency version to `~2.4` so package can be installed in Laravel `4.1.*` | ||
|
||
## 4.1.0 (released 2014-12-27) | ||
|
||
* Added MAC token support (Issue #158) | ||
* Fixed example init code (Issue #280) | ||
* Toggle refresh token rotation (Issue #286) | ||
* Docblock fixes | ||
|
||
## 4.0.5 (released 2014-12-15) | ||
|
||
* Prevent duplicate session in auth code grant (Issue #282) | ||
|
||
## 4.0.4 (released 2014-12-03) | ||
|
||
* Ensure refresh token hasn't expired (Issue #270) | ||
|
||
## 4.0.3 (released 2014-12-02) | ||
|
||
* Fix bad type hintings (Issue #267) | ||
* Do not forget to set the expire time (Issue #268) | ||
|
||
## 4.0.2 (released 2014-11-21) | ||
|
||
* Improved interfaces (Issue #255) | ||
* Learnt how to spell delimiter and so `getScopeDelimiter()` and `setScopeDelimiter()` methods have been renamed | ||
* Docblock improvements (Issue #254) | ||
|
||
## 4.0.1 (released 2014-11-09) | ||
|
||
* Alias the master branch in composer.json (Issue #243) | ||
* Numerous PHP CodeSniffer fixes (Issue #244) | ||
* .travis.yml update (Issue #245) | ||
* The getAccessToken method should return an AccessTokenEntity object instead of a string in ResourceServer.php (#246) | ||
|
||
## 4.0.0 (released 2014-11-08) | ||
|
||
* Complete rewrite | ||
* Check out the documentation - [http://oauth2.thephpleague.com](http://oauth2.thephpleague.com) | ||
|
||
## 3.2.0 (released 2014-04-16) | ||
|
||
* Added the ability to change the algorithm that is used to generate the token strings (Issue #151) | ||
|
||
## 3.1.2 (released 2014-02-26) | ||
|
||
* Support Authorization being an environment variable. [See more](http://fortrabbit.com/docs/essentials/quirks-and-constraints#authorization-header) | ||
|
||
## 3.1.1 (released 2013-12-05) | ||
|
||
* Normalize headers when `getallheaders()` is available (Issues #108 and #114) | ||
|
||
## 3.1.0 (released 2013-12-05) | ||
|
||
* No longer necessary to inject the authorisation server into a grant, the server will inject itself | ||
* Added test for 1419ba8cdcf18dd034c8db9f7de86a2594b68605 | ||
|
||
## 3.0.1 (released 2013-12-02) | ||
|
||
* Forgot to tell TravisCI from testing PHP 5.3 | ||
|
||
## 3.0.0 (released 2013-12-02) | ||
|
||
* Fixed spelling of Implicit grant class (Issue #84) | ||
* Travis CI now tests for PHP 5.5 | ||
* Fixes for checking headers for resource server (Issues #79 and #) | ||
* The word "bearer" now has a capital "B" in JSON output to match OAuth 2.0 spec | ||
* All grants no longer remove old sessions by default | ||
* All grants now support custom access token TTL (Issue #92) | ||
* All methods which didn't before return a value now return `$this` to support method chaining | ||
* Removed the build in DB providers - these will be put in their own repos to remove baggage in the main repository | ||
* Removed support for PHP 5.3 because this library now uses traits and will use other modern PHP features going forward | ||
* Moved some grant related functions into a trait to reduce duplicate code | ||
|
||
## 2.1.1 (released 2013-06-02) | ||
|
||
* Added conditional `isValid()` flag to check for Authorization header only (thanks @alexmcroberts) | ||
* Fixed semantic meaning of `requireScopeParam()` and `requireStateParam()` by changing their default value to true | ||
* Updated some duff docblocks | ||
* Corrected array key call in Resource.php (Issue #63) | ||
|
||
## 2.1 (released 2013-05-10) | ||
|
||
* Moved zetacomponents/database to "suggest" in composer.json. If you rely on this feature you now need to include " zetacomponents/database" into "require" key in your own composer.json. (Issue #51) | ||
* New method in Refresh grant called `rotateRefreshTokens()`. Pass in `true` to issue a new refresh token each time an access token is refreshed. This parameter needs to be set to true in order to request reduced scopes with the new access token. (Issue #47) | ||
* Rename `key` column in oauth_scopes table to `scope` as `key` is a reserved SQL word. (Issue #45) | ||
* The `scope` parameter is no longer required by default as per the RFC. (Issue #43) | ||
* You can now set multiple default scopes by passing an array into `setDefaultScope()`. (Issue #42) | ||
* The password and client credentials grants now allow for multiple sessions per user. (Issue #32) | ||
* Scopes associated to authorization codes are not held in their own table (Issue #44) | ||
* Database schema updates. | ||
|
||
## 2.0.5 (released 2013-05-09) | ||
|
||
* Fixed `oauth_session_token_scopes` table primary key | ||
* Removed `DEFAULT ''` that has slipped into some tables | ||
* Fixed docblock for `SessionInterface::associateRefreshToken()` | ||
|
||
## 2.0.4 (released 2013-05-09) | ||
|
||
* Renamed primary key in oauth_client_endpoints table | ||
* Adding missing column to oauth_session_authcodes | ||
* SECURITY FIX: A refresh token should be bound to a client ID | ||
|
||
## 2.0.3 (released 2013-05-08) | ||
|
||
* Fixed a link to code in composer.json | ||
|
||
## 2.0.2 (released 2013-05-08) | ||
|
||
* Updated README with wiki guides | ||
* Removed `null` as default parameters in some methods in the storage interfaces | ||
* Fixed license copyright | ||
|
||
## 2.0.0 (released 2013-05-08) | ||
|
||
**If you're upgrading from v1.0.8 there are lots of breaking changes** | ||
|
||
* Rewrote the session storage interface from scratch so methods are more obvious | ||
* Included a PDO driver which implements the storage interfaces so the library is more "get up and go" | ||
* Further normalised the database structure so all sessions no longer contain infomation related to authorization grant (which may or may not be enabled) | ||
* A session can have multiple associated access tokens | ||
* Induvidual grants can have custom expire times for access tokens | ||
* Authorization codes now have a TTL of 10 minutes by default (can be manually set) | ||
* Refresh tokens now have a TTL of one week by default (can be manually set) | ||
* The client credentials grant will no longer gives out refresh tokens as per the specification | ||
|
||
## 1.0.8 (released 2013-03-18) | ||
|
||
* Fixed check for required state parameter | ||
* Fixed check that user's credentials are correct in Password grant | ||
|
||
## 1.0.7 (released 2013-03-04) | ||
|
||
* Added method `requireStateParam()` | ||
* Added method `requireScopeParam()` | ||
|
||
## 1.0.6 (released 2013-02-22) | ||
|
||
* Added links to tutorials in the README | ||
* Added missing `state` parameter request to the `checkAuthoriseParams()` method. | ||
|
||
## 1.0.5 (released 2013-02-21) | ||
|
||
* Fixed the SQL example for SessionInterface::getScopes() | ||
|
||
## 1.0.3 (released 2013-02-20) | ||
|
||
* Changed all instances of the "authentication server" to "authorization server" | ||
|
||
## 1.0.2 (released 2013-02-20) | ||
|
||
* Fixed MySQL create table order | ||
* Fixed version number in composer.json | ||
|
||
## 1.0.1 (released 2013-02-19) | ||
|
||
* Updated AuthServer.php to use `self::getParam()` | ||
|
||
## 1.0.0 (released 2013-02-15) | ||
|
||
* First major release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Thanks for contributing to this project. | ||
|
||
|
||
**Please submit your pull request against the `develop` branch only.** | ||
|
||
|
||
Please ensure that you run `phpunit` from the project root after you've made any changes. | ||
|
||
If you've added something new please create a new unit test, if you've changed something please update any unit tests as appropritate. | ||
|
||
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. | ||
|
||
Thank you, | ||
|
||
@alexbilbie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# PHP OAuth 2.0 Server by [@alexbilbie](https://twitter.com/alexbilbie) | ||
|
||
[](https://github.com/thephpleague/oauth2-server/releases) | ||
[](LICENSE.md) | ||
[](https://travis-ci.org/thephpleague/oauth2-server) | ||
[](https://scrutinizer-ci.com/g/thephpleague/oauth2-server/code-structure) | ||
[](https://scrutinizer-ci.com/g/thephpleague/oauth2-server) | ||
[](https://packagist.org/packages/league/oauth2-server) [](https://gitter.im/thephpleague/oauth2-server?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) | ||
|
||
|
||
A standards compliant [OAuth 2.0](http://tools.ietf.org/wg/oauth/draft-ietf-oauth-v2/) authorization server and resource server written in PHP which makes working with OAuth 2.0 trivial. You can easily configure an OAuth 2.0 server to protect your API with access tokens, or allow clients to request new access tokens and refresh them. | ||
|
||
It supports out of the box the following grants: | ||
|
||
* Authorization code grant | ||
* Client credentials grant | ||
* Resource owner password credentials grant | ||
* Refresh grant | ||
|
||
You can also define your own grants. | ||
|
||
In addition it supports the following token types: | ||
|
||
* Bearer tokens | ||
* MAC tokens | ||
* JSON web tokens (coming soon) | ||
|
||
You can also create you own tokens. | ||
|
||
|
||
## Requirements | ||
|
||
The following versions of PHP are supported: | ||
|
||
* PHP 5.4 | ||
* PHP 5.5 | ||
* PHP 5.6 | ||
* HHVM | ||
|
||
## Documentation | ||
|
||
This library has [full documentation](http://oauth2.thephpleague.com), powered by [Jekyll](http://jekyllrb.com/). | ||
|
||
Contribute to this documentation in the [gh-pages branch](https://github.com/thephpleague/oauth2-server/tree/gh-pages/). | ||
|
||
## Changelog | ||
|
||
[See the project releases page](https://github.com/thephpleague/oauth2-server/releases) | ||
|
||
## Contributing | ||
|
||
Please see [CONTRIBUTING](https://github.com/thephpleague/oauth2-server/blob/master/CONTRIBUTING.md) for details. | ||
|
||
## Integration | ||
|
||
- [CakePHP 3](https://github.com/uafrica/oauth-server) | ||
- [Laravel](https://github.com/lucadegasperi/oauth2-server-laravel) | ||
|
||
## Support | ||
|
||
Bugs and feature request are tracked on [GitHub](https://github.com/thephpleague/oauth2-server/issues) | ||
|
||
## Security | ||
|
||
If you discover any security related issues, please email [email protected] instead of using the issue tracker. | ||
|
||
## License | ||
|
||
This package is released under the MIT License. See the bundled [LICENSE](https://github.com/thephpleague/oauth2-server/blob/master/LICENSE) file for details. | ||
|
||
## Credits | ||
|
||
This code is principally developed and maintained by [Alex Bilbie](https://twitter.com/alexbilbie). | ||
|
||
Special thanks to: | ||
|
||
* [Dan Horrigan](https://github.com/dandoescode) | ||
* [Nick Jackson](https://github.com/jacksonj04) | ||
* [Michael Gooden](https://github.com/MichaelGooden) | ||
* [Phil Sturgeon](https://github.com/philsturgeon) | ||
* [and all the other contributors](https://github.com/thephpleague/oauth2-server/contributors) | ||
|
||
The initial code was developed as part of the [Linkey](http://linkey.blogs.lincoln.ac.uk) project which was funded by [JISC](http://jisc.ac.uk) under the Access and Identity Management programme. |
Oops, something went wrong.