You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 23, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+15-19Lines changed: 15 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,46 +26,37 @@
26
26
# Documentation
27
27
## Requirements
28
28
- PHP 7.2+
29
-
- the [Sodium](http://php.net/manual/book.sodium.php) extension for token encryption
30
29
- a [PSR-18](https://www.php-fig.org/psr/psr-18/) compatible HTTP client library of your choice
30
+
- optional [PSR-17](https://www.php-fig.org/psr/psr-17/) compatible Request-, Response- and UriFactories
31
31
- see [`chillerlan/php-oauth`](https://github.com/chillerlan/php-oauth) for already implemented providers
32
32
33
33
## Getting Started
34
-
In order to instance an [`OAuthInterface`](https://github.com/chillerlan/php-oauth-core/blob/master/src/Core/OAuthInterface.php) you you'll need to invoke a [`HTTPClientInterface`](https://github.com/chillerlan/php-httpinterface/blob/master/src/HTTPClientInterface.php), [`OAuthStorageInterface`](https://github.com/chillerlan/php-oauth-core/blob/master/src/Storage/OAuthStorageInterface.php) and `OAuthOptions` (a [`ContainerInterface`](https://github.com/chillerlan/php-traits/blob/master/src/ContainerInterface.php)) objects first:
34
+
In order to instance an [`OAuthInterface`](https://github.com/chillerlan/php-oauth-core/blob/master/src/Core/OAuthInterface.php) you you'll need to invoke a PSR-18 [`ClientInterface`](https://github.com/php-fig/http-client/blob/master/src/ClientInterface.php), a [`OAuthStorageInterface`](https://github.com/chillerlan/php-oauth-core/blob/master/src/Storage/OAuthStorageInterface.php) and `OAuthOptions` (a [`SettingsContainerInterface`](https://github.com/chillerlan/php-settings-container/blob/master/src/SettingsContainerInterface.php)) objects first:
35
35
```php
36
36
use chillerlan\OAuth\Providers\<PROVIDER_NAMESPACE>\<PROVIDER>;
37
37
use chillerlan\OAuth\{OAuthOptions, Storage\SessionTokenStorage};
[OAuth2 is a very straightforward... mess](https://hueniverse.com/oauth-2-0-and-the-road-to-hell-8eec45921529). Please refer to your provider's docs for implementation details.
162
158
```php
163
-
use chillerlan\OAuth\Providers\OAuth2Provider;
159
+
use chillerlan\OAuth\Core\OAuth2Provider;
164
160
165
161
class MyOauth2Provider extends Oauth2Provider implements ClientCredentials, CSRFToken, TokenExpires, TokenRefresh{
166
162
use OAuth2ClientCredentialsTrait, OAuth2CSRFTokenTrait, OAuth2TokenRefreshTrait;
0 commit comments