Skip to content

Commit c880698

Browse files
committed
📖
1 parent f8a7457 commit c880698

24 files changed

+77
-30
lines changed

README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ A transparent, framework-agnostic, easily extensible PHP [PSR-18](https://www.ph
4444
- [RFC-7009: Token Revocation](https://datatracker.ietf.org/doc/html/rfc7009)
4545
- [RFC-7636: PKCE](https://datatracker.ietf.org/doc/html/rfc7636) (Proof Key for Code Exchange)
4646
- [RFC-9126: PAR](https://datatracker.ietf.org/doc/html/rfc9126) (Pushed Authorization Requests)
47+
- ~~[RFC-9449: DPoP](https://datatracker.ietf.org/doc/html/rfc9449) (Demonstrating Proof of Possession)~~ ([planned](https://github.com/chillerlan/php-oauth/issues/3))
4748
- Proprietary, OAuth-like authorization flows (e.g. [Last.fm](https://www.last.fm/api/authentication))
4849
- Invalidation of access tokens (if supported by the provider)
4950
- Several built-in provider implementations ([see below](#implemented-providers))
@@ -67,6 +68,9 @@ A transparent, framework-agnostic, easily extensible PHP [PSR-18](https://www.ph
6768
- The user manual is at https://php-oauth.readthedocs.io/ ([sources](https://github.com/chillerlan/php-oauth/tree/main/docs))
6869
- An API documentation created with [phpDocumentor](https://www.phpdoc.org/) can be found at https://chillerlan.github.io/php-oauth/
6970
- The documentation for the `AccessToken`, `AuthenticatedUser` and `OAuthOptions` containers can be found here: [chillerlan/php-settings-container](https://github.com/chillerlan/php-settings-container#readme)
71+
- There is [the suite of get-token examples](https://php-oauth.readthedocs.io/en/main/Usage/Using-examples.html), which is mostly intended for development, and there are self-contained examples for a quickstart:
72+
- [OAuth1 example](https://github.com/chillerlan/php-oauth/tree/main/examples/example-oauth1.php)
73+
- [OAuth2 example](https://github.com/chillerlan/php-oauth/tree/main/examples/example-oauth2.php)
7074

7175

7276
## Installation with [composer](https://getcomposer.org)
@@ -95,16 +99,6 @@ composer require chillerlan/php-oauth
9599
Note: replace `dev-main` with a [version constraint](https://getcomposer.org/doc/articles/versions.md#writing-version-constraints), e.g. `^1.0` - see [releases](https://github.com/chillerlan/php-oauth/releases) for valid versions.
96100

97101

98-
## Examples
99-
100-
There is [the suite of get-token examples](https://php-oauth.readthedocs.io/en/main/Usage/Using-examples.html),
101-
which is mostly intended for development, and there are self-contained examples for a quickstart:
102-
103-
- [OAuth1 example](https://github.com/chillerlan/php-oauth/tree/main/examples/example-oauth1.php)
104-
- [OAuth2 example](https://github.com/chillerlan/php-oauth/tree/main/examples/example-oauth2.php)
105-
106-
107-
108102
# Implemented Providers
109103

110104
<!-- TABLE-START -->

src/Storage/OAuthStorageInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
use Psr\Log\LoggerInterface;
1616

1717
/**
18-
* Specifies the methods required for an OAuth token storage adapter
18+
* Specifies the methods required for an OAuth storage adapter
1919
*
20-
* The token storage is intended to be invoked per-user,
21-
* for whom it can store tokens for any of the implemented providers.
20+
* The storage is intended to be invoked per-user, for whom it can
21+
* store tokens, state etc. for any of the implemented providers.
2222
*
2323
* The implementer must ensure that the same storage instance is not used for multiple users.
2424
*/

tests/Attributes/Provider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
/**
1717
* Supplies the provider class name
18+
*
19+
* example: `#[Provider(GitHub::class)]`
1820
*/
1921
#[Attribute(Attribute::TARGET_CLASS)]
2022
final class Provider{

tests/Core/AuthenticatedUserTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use PHPUnit\Framework\TestCase;
1717

1818
/**
19-
*
19+
* Tests the AuthenticatedUser class
2020
*/
2121
final class AuthenticatedUserTest extends TestCase{
2222

@@ -80,10 +80,10 @@ public static function displayNameProvider():array{
8080
}
8181

8282
#[DataProvider('displayNameProvider')]
83-
public function testSetDisplayName(string|null $displayName, string|null $expexted):void{
83+
public function testSetDisplayName(string|null $displayName, string|null $expected):void{
8484
$user = new AuthenticatedUser(['displayName' => $displayName]);
8585

86-
$this::assertSame($expexted, $user->displayName);
86+
$this::assertSame($expected, $user->displayName);
8787
}
8888

8989
}

tests/Core/OAuthOptionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use PHPUnit\Framework\TestCase;
1717

1818
/**
19-
*
19+
* Tests the OAuthOptions class
2020
*/
2121
class OAuthOptionsTest extends TestCase{
2222

tests/Core/OAuthProviderFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
use function realpath;
2424

2525
/**
26-
*
26+
* Tests the OAuthProviderFactory class
2727
*/
2828
class OAuthProviderFactoryTest extends TestCase{
2929
use HttpFactoryTrait;

tests/Core/UtilitiesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use InvalidArgumentException, ReflectionClass;
1818

1919
/**
20-
*
20+
* Tests the Utilities class
2121
*/
2222
class UtilitiesTest extends TestCase{
2323

tests/Providers/Live/OAuth1ProviderLiveTestAbstract.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
namespace chillerlan\OAuthTest\Providers\Live;
1313

1414
/**
15+
* OAuth1 live API test
16+
*
1517
* @property \chillerlan\OAuth\Core\OAuth1Interface $provider
1618
*/
1719
abstract class OAuth1ProviderLiveTestAbstract extends OAuthProviderLiveTestAbstract{

tests/Providers/Live/OAuth2ProviderLiveTestAbstract.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
use function time;
1818

1919
/**
20+
* OAuth2 live API test
21+
*
2022
* @property \chillerlan\OAuth\Core\OAuth2Interface $provider
2123
*/
2224
abstract class OAuth2ProviderLiveTestAbstract extends OAuthProviderLiveTestAbstract{

tests/Providers/Live/OAuthProviderLiveTestAbstract.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
use function constant, sprintf;
2121

2222
/**
23+
* abstract OAuth live API test
24+
*
2325
* @property \chillerlan\OAuth\Core\OAuthInterface $provider
2426
*/
2527
abstract class OAuthProviderLiveTestAbstract extends ProviderLiveTestAbstract{

0 commit comments

Comments
 (0)