Skip to content

Commit bac3df2

Browse files
committed
📖
1 parent d1040b0 commit bac3df2

File tree

5 files changed

+25
-27
lines changed

5 files changed

+25
-27
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# chillerlan/php-oauth
22

3-
A transparent, framework-agnostic, easily extensible PHP [PSR-18](https://www.php-fig.org/psr/psr-18/) OAuth 1/2 client with a user-friendly API, fully [PSR-7](https://www.php-fig.org/psr/psr-7/)/[PSR-17](https://www.php-fig.org/psr/psr-17/) compatible.
3+
A transparent, framework-agnostic, easily extensible PHP [PSR-18](https://www.php-fig.org/psr/psr-18/) OAuth client with a user-friendly API, fully [PSR-7](https://www.php-fig.org/psr/psr-7/)/[PSR-17](https://www.php-fig.org/psr/psr-17/) compatible.
44

55

66
[![PHP Version Support][php-badge]][php]
@@ -35,20 +35,20 @@ A transparent, framework-agnostic, easily extensible PHP [PSR-18](https://www.ph
3535
## Features
3636

3737
- OAuth client capabilities
38-
- [OAuth 1.0a](https://oauth.net/core/1.0a/)
39-
- [OAuth 2.0](https://oauth.net/2/)
40-
- [Authorization Code Grant](https://datatracker.ietf.org/doc/html/rfc6749#section-4.1)
41-
- [Client Credentials Grant](https://datatracker.ietf.org/doc/html/rfc6749#section-4.4)
42-
- [Token refresh](https://datatracker.ietf.org/doc/html/rfc6749#section-1.5)
43-
- [CSRF Token](https://datatracker.ietf.org/doc/html/rfc6749#section-10.12) ("state" parameter)
44-
- [RFC-7009: Token Revocation](https://datatracker.ietf.org/doc/html/rfc7009)
45-
- [RFC-7636: PKCE](https://datatracker.ietf.org/doc/html/rfc7636) (Proof Key for Code Exchange)
46-
- [RFC-9126: PAR](https://datatracker.ietf.org/doc/html/rfc9126) (Pushed Authorization Requests)
47-
- Proprietary, OAuth-like authorization flows (e.g. [Last.fm](https://www.last.fm/api/authentication))
48-
- Invalidation of access tokens (if supported by the provider)
38+
- [OAuth 1.0a](https://oauth.net/core/1.0a/) ([RFC-5849](https://datatracker.ietf.org/doc/html/rfc5849))
39+
- [OAuth 2.0](https://oauth.net/2/) ([RFC-6749](https://datatracker.ietf.org/doc/html/rfc6749))
40+
- [Authorization Code Grant](https://datatracker.ietf.org/doc/html/rfc6749#section-4.1)
41+
- [Client Credentials Grant](https://datatracker.ietf.org/doc/html/rfc6749#section-4.4)
42+
- [Token refresh](https://datatracker.ietf.org/doc/html/rfc6749#section-1.5)
43+
- [CSRF Token](https://datatracker.ietf.org/doc/html/rfc6749#section-10.12) ("state" parameter)
44+
- [RFC-7009: Token Revocation](https://datatracker.ietf.org/doc/html/rfc7009)
45+
- [RFC-7636: PKCE](https://datatracker.ietf.org/doc/html/rfc7636) (Proof Key for Code Exchange)
46+
- [RFC-9126: PAR](https://datatracker.ietf.org/doc/html/rfc9126) (Pushed Authorization Requests)
47+
- Proprietary, OAuth-like authorization flows (e.g. [Last.fm](https://www.last.fm/api/authentication))
48+
- Invalidation of access tokens (if supported by the provider)
4949
- Several built-in provider implementations ([see below](#implemented-providers))
50-
- Provider instances act as [PSR-18](https://www.php-fig.org/psr/psr-18/) HTTP client, wrapping the given PSR-18 HTTP instance
51-
- Requests to the provider API will have required OAuth headers and tokens added automatically
50+
- Provider instances act as [PSR-18](https://www.php-fig.org/psr/psr-18/) HTTP client, wrapping the given PSR-18 HTTP instance
51+
- Requests to the provider API will have required OAuth headers and tokens added automatically
5252
- Optional token encryption via [`sodium_crypto_secretbox()`](https://www.php.net/manual/en/function.sodium-crypto-secretbox) for the internal storage engines
5353
- A unified user data object `AuthenticatedUser` via the `OAuthInterface::me()` method
5454

@@ -57,7 +57,7 @@ A transparent, framework-agnostic, easily extensible PHP [PSR-18](https://www.ph
5757

5858
- PHP 8.1+
5959
- extensions: `json`, `sodium`
60-
- from dependencies: `curl`, `fileinfo`, `intl`, `mbstring`, `simplexml`, `zlib`
60+
- from dependencies: `curl`, `fileinfo`, `intl`, `mbstring`, `simplexml`, `zlib`
6161
- a [PSR-18](https://www.php-fig.org/psr/psr-18/) compatible HTTP client library of your choice
6262
- [PSR-17](https://www.php-fig.org/psr/psr-17/) compatible `RequestFactory`, `StreamFactory` and `UriFactory`
6363

docs/Basics/Configuration-settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Configuration settings
2-
<!-- This file is auto generated from the source of OAuthOptionsTrait.php -->
2+
<!-- This file is auto generated from the source of OAuthOptions.php -->
33
## key
44

55
The application key (or client-id) given by your provider

docs/Basics/Overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ fully [PSR-7](https://www.php-fig.org/psr/psr-7/)/[PSR-17](https://www.php-fig.o
77
## Features
88

99
- OAuth client capabilities
10-
- [OAuth 1.0a](https://oauth.net/core/1.0a/)
11-
- [OAuth 2.0](https://oauth.net/2/)
10+
- [OAuth 1.0a](https://oauth.net/core/1.0a/) ([RFC-5849](https://datatracker.ietf.org/doc/html/rfc5849))
11+
- [OAuth 2.0](https://oauth.net/2/) ([RFC-6749](https://datatracker.ietf.org/doc/html/rfc6749))
1212
- [Authorization Code Grant](https://datatracker.ietf.org/doc/html/rfc6749#section-4.1)
1313
- [Client Credentials Grant](https://datatracker.ietf.org/doc/html/rfc6749#section-4.4)
1414
- [Token refresh](https://datatracker.ietf.org/doc/html/rfc6749#section-1.5)

docs/Development/Create-tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ The JSON looks similar to the following:
8686
"accessTokenSecret": null,
8787
"accessToken": "<access_token>",
8888
"refreshToken": null,
89-
"expires": -9002,
89+
"expires": -51966,
9090
"extraParams": {
9191
"token_type": "bearer"
9292
},

docs/oauth-options-doc.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
* @license MIT
99
*/
1010

11-
use chillerlan\OAuth\OAuthOptionsTrait;
11+
use chillerlan\OAuth\OAuthOptions;
1212

1313
require_once __DIR__.'/../vendor/autoload.php';
1414

1515
$file = 'Basics/Configuration-settings.md';
1616
$content = [
1717
'# Configuration settings',
18-
'<!-- This file is auto generated from the source of OAuthOptionsTrait.php -->',
18+
'<!-- This file is auto generated from the source of OAuthOptions.php -->',
1919
];
2020

21-
$reflectionClass = new ReflectionClass(OAuthOptionsTrait::class);
21+
$reflectionClass = new ReflectionClass(OAuthOptions::class);
2222

2323
foreach($reflectionClass->getProperties(ReflectionProperty::IS_PROTECTED) as $reflectionProperty){
2424
$docblock = $reflectionProperty->getDocComment();
@@ -51,14 +51,14 @@
5151

5252
// collect links for "see also"
5353
if(str_starts_with($line, '@see')){
54-
$see[] = $line;
54+
$see[] = substr($line, 5); // cut off the "@see "
5555

5656
continue;
5757
}
5858

5959
// collect links for "links"
6060
if(str_starts_with($line, '@link')){
61-
$link[] = $line;
61+
$link[] = substr($line, 6); // cut off the "@link "
6262

6363
continue;
6464
}
@@ -71,7 +71,6 @@
7171
$content[] = "\n**See also:**\n";
7272

7373
foreach($see as $line){
74-
$line = substr($line, 5); // cut off the "@see "
7574

7675
// normal links
7776
if(str_starts_with($line, 'http')){
@@ -100,7 +99,6 @@
10099
$content[] = "\n**Links:**\n";
101100

102101
foreach($link as $line){
103-
$line = substr($line, 6); // cut off the "@link "
104102

105103
// skip non-url
106104
if(!str_starts_with($line, 'http')){
@@ -123,6 +121,6 @@
123121

124122
file_put_contents(__DIR__.'/'.$file, implode("\n", $content));
125123

126-
printf('Built "%s" from "%s"', $file, OAuthOptionsTrait::class);
124+
printf('Built "%s" from "%s"', $file, OAuthOptions::class);
127125

128126
exit(0);

0 commit comments

Comments
 (0)