Improved repository docs

This commit is contained in:
Alex Bilbie 2016-04-27 21:13:23 +01:00
parent f2d28e4775
commit 93c98ead51
3 changed files with 25 additions and 0 deletions

View File

@ -6,6 +6,16 @@ permalink: /access-token-repository-interface/
# Access Token Repository Interface
## getNewToken() : AccessTokenEntityInterface
This method should return an implementation of `\League\OAuth2\Server\Entities\AccessTokenEntityInterface`. You can use the following traits to help you implement the required methods from that interface:
* `League\OAuth2\Server\Entities\Traits\AccessTokenTrait`
* `League\OAuth2\Server\Entities\Traits\EntityTrait`
* `League\OAuth2\Server\Entities\Traits\TokenEntityTrait`
Note in version `5.0.x` this method has a number of parameters passed in. As of version `5.1.0` these parameters have been removed because they were unnecessary (see issue #553).
## persistNewAccessToken() : void
When a new access token is created this method will be called. You don't have to do anything here but for auditing you probably want to.

View File

@ -6,6 +6,14 @@ permalink: /auth-code-repository-interface/
# Auth Code Repository Interface
## getNewAuthCode() : AuthCodeEntityInterface
This method should return an implementation of `\League\OAuth2\Server\Entities\AuthCodeEntityInterface`. You can use the following traits to help you implement the required methods from that interface:
* `League\OAuth2\Server\Entities\Traits\EntityTrait`
* `League\OAuth2\Server\Entities\Traits\TokenEntityTrait`
* `League\OAuth2\Server\Entities\Traits\AuthCodeTrait`
## persistNewAuthCode() : void
When a new access token is created this method will be called. You don't have to do anything here but for auditing you probably want to.

View File

@ -6,6 +6,13 @@ permalink: /refresh-token-repository-interface/
# Refresh Token Repository Interface
## getNewRefreshToken() : RefreshTokenEntityInterface
This method should return an implementation of `\League\OAuth2\Server\Entities\RefreshTokenEntityInterface`. You can use the following traits to help you implement the required methods from that interface:
* `League\OAuth2\Server\Entities\Traits\RefreshTokenTrait`
* `League\OAuth2\Server\Entities\Traits\EntityTrait`
## persistNewRefreshToken() : void
When a new refresh token is created this method will be called. You don't have to do anything here but for auditing you might want to.