• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2021-

examples/H03-May-2021-1,7671,343

src/H03-May-2021-4,2961,950

.scrutinizer.ymlH A D03-May-2021920 3635

.styleci.ymlH A D03-May-20211.3 KiB5351

.travis.ymlH A D03-May-2021570 3425

CHANGELOG.mdH A D03-May-202121.4 KiB508369

CODE_OF_CONDUCT.mdH A D03-May-20213.2 KiB7455

CONTRIBUTING.mdH A D03-May-2021539 167

LICENSEH A D03-May-20211 KiB2016

README.mdH A D03-May-20215.8 KiB11470

composer.jsonH A D03-May-20212 KiB7372

phpstan.neonH A D03-May-2021331 1110

phpunit.xml.distH A D03-May-20211.2 KiB2524

README.md

1# PHP OAuth 2.0 Server
2
3[![Latest Version](http://img.shields.io/packagist/v/league/oauth2-server.svg?style=flat-square)](https://github.com/thephpleague/oauth2-server/releases)
4[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
5[![Build Status](https://img.shields.io/travis/thephpleague/oauth2-server/master.svg?style=flat-square)](https://travis-ci.org/thephpleague/oauth2-server)
6[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/thephpleague/oauth2-server.svg?style=flat-square)](https://scrutinizer-ci.com/g/thephpleague/oauth2-server/code-structure)
7[![Quality Score](https://img.shields.io/scrutinizer/g/thephpleague/oauth2-server.svg?style=flat-square)](https://scrutinizer-ci.com/g/thephpleague/oauth2-server)
8[![Total Downloads](https://img.shields.io/packagist/dt/league/oauth2-server.svg?style=flat-square)](https://packagist.org/packages/league/oauth2-server)
9[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-brightgreen.svg?style=flat-square)](https://github.com/phpstan/phpstan)
10
11`league/oauth2-server` is a standards compliant implementation of an [OAuth 2.0](https://tools.ietf.org/html/rfc6749) authorization 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.
12
13Out of the box it supports the following grants:
14
15* Authorization code grant
16* Implicit grant
17* Client credentials grant
18* Resource owner password credentials grant
19* Refresh grant
20
21The following RFCs are implemented:
22
23* [RFC6749 "OAuth 2.0"](https://tools.ietf.org/html/rfc6749)
24* [RFC6750 " The OAuth 2.0 Authorization Framework: Bearer Token Usage"](https://tools.ietf.org/html/rfc6750)
25* [RFC7519 "JSON Web Token (JWT)"](https://tools.ietf.org/html/rfc7519)
26* [RFC7636 "Proof Key for Code Exchange by OAuth Public Clients"](https://tools.ietf.org/html/rfc7636)
27
28This library was created by Alex Bilbie. Find him on Twitter at [@alexbilbie](https://twitter.com/alexbilbie).
29
30## Requirements
31
32The following versions of PHP are supported:
33
34* PHP 7.0
35* PHP 7.1
36* PHP 7.2
37* PHP 7.3
38
39The `openssl` extension is also required.
40
41All HTTP messages passed to the server should be [PSR-7 compliant](https://www.php-fig.org/psr/psr-7/). This ensures interoperability with other packages and frameworks.
42
43## Installation
44
45```
46composer require league/oauth2-server
47```
48
49## Documentation
50
51The library documentation can be found at [https://oauth2.thephpleague.com](https://oauth2.thephpleague.com).
52You can contribute to the documentation in the [gh-pages branch](https://github.com/thephpleague/oauth2-server/tree/gh-pages/).
53
54## Testing
55
56The library uses [PHPUnit](https://phpunit.de/) for unit tests and [PHPStan](https://github.com/phpstan/phpstan) for static analysis of the code.
57
58```
59vendor/bin/phpunit
60vendor/bin/phpstan analyse -l 7 -c phpstan.neon src tests
61```
62
63## Continous Integration
64
65We use [Travis CI](https://travis-ci.org/), [Scrutinizer](https://scrutinizer-ci.com/), and [StyleCI](https://styleci.io/) for continuous integration. Check out [our](https://github.com/thephpleague/oauth2-server/blob/master/.travis.yml) [configuration](https://github.com/thephpleague/oauth2-server/blob/master/.scrutinizer.yml) [files](https://github.com/thephpleague/oauth2-server/blob/master/.styleci.yml) if you'd like to know more.
66
67## Community Integrations
68
69* [Drupal](https://www.drupal.org/project/simple_oauth)
70* [Laravel Passport](https://github.com/laravel/passport)
71* [OAuth 2 Server for CakePHP 3](https://github.com/uafrica/oauth-server)
72* [OAuth 2 Server for Expressive](https://github.com/zendframework/zend-expressive-authentication-oauth2)
73* [Trikoder OAuth 2 Bundle (Symfony)](https://github.com/trikoder/oauth2-bundle)
74
75## Changelog
76
77See the [project changelog](https://github.com/thephpleague/oauth2-server/blob/master/CHANGELOG.md)
78
79## Contributing
80
81Contributions are always welcome. Please see [CONTRIBUTING.md](https://github.com/thephpleague/oauth2-server/blob/master/CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](https://github.com/thephpleague/oauth2-server/blob/master/CODE_OF_CONDUCT.md) for details.
82
83## Support
84
85Bugs and feature request are tracked on [GitHub](https://github.com/thephpleague/oauth2-server/issues).
86
87If you have any questions about OAuth _please_ open a ticket here; please **don't** email the address below.
88
89## Commercial Support
90
91If you would like help implementing this library into your existing platform, or would be interested in OAuth advice or training for you and your team please get in touch with [Glynde Labs](https://glyndelabs.com).
92
93## Security
94
95If you discover any security related issues, please email `hello@alexbilbie.com` instead of using the issue tracker.
96
97## License
98
99This package is released under the MIT License. See the bundled [LICENSE](https://github.com/thephpleague/oauth2-server/blob/master/LICENSE) file for details.
100
101## Credits
102
103This code is principally developed and maintained by [Andy Millington](https://twitter.com/Sephster) and [Simon Hamp](https://twitter.com/simonhamp).
104
105Between 2012 and 2017 this library was developed and maintained by [Alex Bilbie](https://alexbilbie.com/).
106
107PHP OAuth 2.0 Server is one of many packages provided by The PHP League. To find out more, please visit [our website](https://thephpleague.com).
108
109Special thanks to [all of these awesome contributors](https://github.com/thephpleague/oauth2-server/contributors).
110
111Additional thanks go to the [Mozilla Secure Open Source Fund](https://wiki.mozilla.org/MOSS/Secure_Open_Source) for funding a security audit of this library.
112
113The 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.
114