Skip to content

Commit 86ecd06

Browse files
committed
📖
1 parent 71b0d66 commit 86ecd06

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/Development/Additional-functionality.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Services may support additional features, such as token refresh or invalidation, among other things. You can add these features
44
by implementing one or more of the feature interfaces. Some of the methods for these interfaces are already implemented in the
5-
abstract providers, so that you only rarely need to re-implement them.
5+
abstract providers, so that you only rarely need to re-implement them - for others, especially newer RFCs, there are traits that can be used.
66

77

88
## `UserInfo`
@@ -82,9 +82,9 @@ The `ClientCredentials` interface indicates that the provider supports the OAuth
8282
This allows the creation of access tokens without user context via the method `ClientCredentials::getClientCredentialsToken()` that is already implemented in `OAuth2Provider`.
8383
Similar to the user authorization request, an optional set of scopes can be supplied via the `$scopes` parameter.
8484

85-
8685
```php
8786
class MyOAuth2Provider extends OAuth2Provider implements ClientCredentials{
87+
use ClientCredentialsTrait;
8888

8989
/*
9090
* ...
@@ -181,6 +181,7 @@ If you need to override either of the aforementioned request methods, don't forg
181181

182182
```php
183183
class MyOAuth2Provider extends OAuth2Provider implements PKCE{
184+
use PKCETrait;
184185

185186
/*
186187
* ...
@@ -243,6 +244,7 @@ In case the service needs additional parameters in the final authorization URL,
243244

244245
```php
245246
class MyOAuth2Provider extends OAuth2Provider implements PAR{
247+
use PARTrait;
246248

247249
/*
248250
* ...
@@ -279,6 +281,7 @@ The implementation in `OAuth2Provider` is divided in parts that can be overridde
279281

280282
```php
281283
class MyOAuth2Provider extends OAuth2Provider implements TokenInvalidate{
284+
use TokenInvalidateTrait;
282285

283286
/*
284287
* ...
@@ -323,6 +326,7 @@ This can be solved by simply cloning the current provider instance, feed the giv
323326

324327
```php
325328
class MyOAuth2Provider extends OAuth2Provider implements TokenInvalidate{
329+
use TokenInvalidateTrait;
326330

327331
/*
328332
* ...

0 commit comments

Comments
 (0)