@@ -14,14 +14,14 @@ |
||
| 14 | 14 | class OauthScope extends Entity |
| 15 | 15 | { |
| 16 | 16 | /** |
| 17 | - * {@inheritdoc} |
|
| 18 | - */ |
|
| 17 | + * {@inheritdoc} |
|
| 18 | + */ |
|
| 19 | 19 | public static function mapEntity(EntityMapperInterface $mapper): void |
| 20 | 20 | { |
| 21 | - $mapper->useTimestamp(); |
|
| 22 | - $mapper->casts([ |
|
| 21 | + $mapper->useTimestamp(); |
|
| 22 | + $mapper->casts([ |
|
| 23 | 23 | 'created_at' => 'date', |
| 24 | 24 | 'updated_at' => '?date', |
| 25 | - ]); |
|
| 25 | + ]); |
|
| 26 | 26 | } |
| 27 | 27 | } |
@@ -11,8 +11,7 @@ |
||
| 11 | 11 | * @class OauthScope |
| 12 | 12 | * @package Platine\Framework\OAuth2\Entity |
| 13 | 13 | */ |
| 14 | -class OauthScope extends Entity |
|
| 15 | -{ |
|
| 14 | +class OauthScope extends Entity { |
|
| 16 | 15 | /** |
| 17 | 16 | * {@inheritdoc} |
| 18 | 17 | */ |
@@ -14,16 +14,16 @@ |
||
| 14 | 14 | class OauthRefreshToken extends Entity |
| 15 | 15 | { |
| 16 | 16 | /** |
| 17 | - * {@inheritdoc} |
|
| 18 | - */ |
|
| 17 | + * {@inheritdoc} |
|
| 18 | + */ |
|
| 19 | 19 | public static function mapEntity(EntityMapperInterface $mapper): void |
| 20 | 20 | { |
| 21 | - $mapper->primaryKey('refresh_token'); |
|
| 22 | - $mapper->useTimestamp(); |
|
| 23 | - $mapper->casts([ |
|
| 21 | + $mapper->primaryKey('refresh_token'); |
|
| 22 | + $mapper->useTimestamp(); |
|
| 23 | + $mapper->casts([ |
|
| 24 | 24 | 'expires' => 'date', |
| 25 | 25 | 'created_at' => 'date', |
| 26 | 26 | 'updated_at' => '?date', |
| 27 | - ]); |
|
| 27 | + ]); |
|
| 28 | 28 | } |
| 29 | 29 | } |
@@ -11,8 +11,7 @@ |
||
| 11 | 11 | * @class OauthRefreshToken |
| 12 | 12 | * @package Platine\Framework\OAuth2\Entity |
| 13 | 13 | */ |
| 14 | -class OauthRefreshToken extends Entity |
|
| 15 | -{ |
|
| 14 | +class OauthRefreshToken extends Entity { |
|
| 16 | 15 | /** |
| 17 | 16 | * {@inheritdoc} |
| 18 | 17 | */ |
@@ -14,16 +14,16 @@ |
||
| 14 | 14 | class OauthAccessToken extends Entity |
| 15 | 15 | { |
| 16 | 16 | /** |
| 17 | - * {@inheritdoc} |
|
| 18 | - */ |
|
| 17 | + * {@inheritdoc} |
|
| 18 | + */ |
|
| 19 | 19 | public static function mapEntity(EntityMapperInterface $mapper): void |
| 20 | 20 | { |
| 21 | - $mapper->primaryKey('access_token'); |
|
| 22 | - $mapper->useTimestamp(); |
|
| 23 | - $mapper->casts([ |
|
| 21 | + $mapper->primaryKey('access_token'); |
|
| 22 | + $mapper->useTimestamp(); |
|
| 23 | + $mapper->casts([ |
|
| 24 | 24 | 'expires' => 'date', |
| 25 | 25 | 'created_at' => 'date', |
| 26 | 26 | 'updated_at' => '?date', |
| 27 | - ]); |
|
| 27 | + ]); |
|
| 28 | 28 | } |
| 29 | 29 | } |
@@ -11,8 +11,7 @@ |
||
| 11 | 11 | * @class OauthAccessToken |
| 12 | 12 | * @package Platine\Framework\OAuth2\Entity |
| 13 | 13 | */ |
| 14 | -class OauthAccessToken extends Entity |
|
| 15 | -{ |
|
| 14 | +class OauthAccessToken extends Entity { |
|
| 16 | 15 | /** |
| 17 | 16 | * {@inheritdoc} |
| 18 | 17 | */ |
@@ -42,8 +42,7 @@ discard block |
||
| 42 | 42 | * @class TokenRevocationRequestHandler |
| 43 | 43 | * @package Platine\Framework\OAuth2\Handler |
| 44 | 44 | */ |
| 45 | -class TokenRevocationRequestHandler implements RequestHandlerInterface |
|
| 46 | -{ |
|
| 45 | +class TokenRevocationRequestHandler implements RequestHandlerInterface { |
|
| 47 | 46 | /** |
| 48 | 47 | * The Authorization Server |
| 49 | 48 | * @var AuthorizationServerInterface |
@@ -54,8 +53,7 @@ discard block |
||
| 54 | 53 | * Create new instance |
| 55 | 54 | * @param AuthorizationServerInterface $authorizationServer |
| 56 | 55 | */ |
| 57 | - public function __construct(AuthorizationServerInterface $authorizationServer) |
|
| 58 | - { |
|
| 56 | + public function __construct(AuthorizationServerInterface $authorizationServer) { |
|
| 59 | 57 | $this->authorizationServer = $authorizationServer; |
| 60 | 58 | } |
| 61 | 59 | |
@@ -43,8 +43,7 @@ discard block |
||
| 43 | 43 | * @class AccessTokenRequestHandler |
| 44 | 44 | * @package Platine\Framework\OAuth2\Handler |
| 45 | 45 | */ |
| 46 | -class AccessTokenRequestHandler implements RequestHandlerInterface |
|
| 47 | -{ |
|
| 46 | +class AccessTokenRequestHandler implements RequestHandlerInterface { |
|
| 48 | 47 | /** |
| 49 | 48 | * The Authorization Server |
| 50 | 49 | * @var AuthorizationServerInterface |
@@ -55,8 +54,7 @@ discard block |
||
| 55 | 54 | * Create new instance |
| 56 | 55 | * @param AuthorizationServerInterface $authorizationServer |
| 57 | 56 | */ |
| 58 | - public function __construct(AuthorizationServerInterface $authorizationServer) |
|
| 59 | - { |
|
| 57 | + public function __construct(AuthorizationServerInterface $authorizationServer) { |
|
| 60 | 58 | $this->authorizationServer = $authorizationServer; |
| 61 | 59 | } |
| 62 | 60 | |
@@ -43,8 +43,7 @@ discard block |
||
| 43 | 43 | * @class AuthorizationRequestHandler |
| 44 | 44 | * @package Platine\Framework\OAuth2\Handler |
| 45 | 45 | */ |
| 46 | -class AuthorizationRequestHandler implements RequestHandlerInterface |
|
| 47 | -{ |
|
| 46 | +class AuthorizationRequestHandler implements RequestHandlerInterface { |
|
| 48 | 47 | /** |
| 49 | 48 | * The Authorization Server |
| 50 | 49 | * @var AuthorizationServerInterface |
@@ -55,8 +54,7 @@ discard block |
||
| 55 | 54 | * Create new instance |
| 56 | 55 | * @param AuthorizationServerInterface $authorizationServer |
| 57 | 56 | */ |
| 58 | - public function __construct(AuthorizationServerInterface $authorizationServer) |
|
| 59 | - { |
|
| 57 | + public function __construct(AuthorizationServerInterface $authorizationServer) { |
|
| 60 | 58 | $this->authorizationServer = $authorizationServer; |
| 61 | 59 | } |
| 62 | 60 | |
@@ -120,7 +120,7 @@ |
||
| 120 | 120 | */ |
| 121 | 121 | protected function shouldBeProcessed(ServerRequestInterface $request): bool |
| 122 | 122 | { |
| 123 | - //If no route has been match no need check |
|
| 123 | + //If no route has been match no need check |
|
| 124 | 124 | /** @var Route|null $route */ |
| 125 | 125 | $route = $request->getAttribute(Route::class); |
| 126 | 126 | if ($route === null) { |
@@ -49,8 +49,7 @@ |
||
| 49 | 49 | * @package Platine\Framework\OAuth2\Middleware |
| 50 | 50 | * @template T |
| 51 | 51 | */ |
| 52 | -class OauthResourceMiddleware implements MiddlewareInterface |
|
| 53 | -{ |
|
| 52 | +class OauthResourceMiddleware implements MiddlewareInterface { |
|
| 54 | 53 | /** |
| 55 | 54 | * The Resource Server |
| 56 | 55 | * @var ResourceServerInterface |