@@ -51,8 +51,7 @@ |
||
| 51 | 51 | * @class AuthorizationServer |
| 52 | 52 | * @package Platine\OAuth2 |
| 53 | 53 | */ |
| 54 | -class AuthorizationServer implements AuthorizationServerInterface |
|
| 55 | -{ |
|
| 54 | +class AuthorizationServer implements AuthorizationServerInterface { |
|
| 56 | 55 | /** |
| 57 | 56 | * The ClientService |
| 58 | 57 | * @var ClientService |
@@ -47,8 +47,7 @@ |
||
| 47 | 47 | * @class ResourceServer |
| 48 | 48 | * @package Platine\OAuth2 |
| 49 | 49 | */ |
| 50 | -class ResourceServer implements ResourceServerInterface |
|
| 51 | -{ |
|
| 50 | +class ResourceServer implements ResourceServerInterface { |
|
| 52 | 51 | /** |
| 53 | 52 | * The AccessTokenService |
| 54 | 53 | * @var AccessTokenService |
@@ -45,8 +45,7 @@ |
||
| 45 | 45 | * @class ResourceServerInterface |
| 46 | 46 | * @package Platine\OAuth2 |
| 47 | 47 | */ |
| 48 | -interface ResourceServerInterface |
|
| 49 | -{ |
|
| 48 | +interface ResourceServerInterface { |
|
| 50 | 49 | /** |
| 51 | 50 | * Return the access token |
| 52 | 51 | * @param ServerRequestInterface $request |
@@ -42,8 +42,7 @@ |
||
| 42 | 42 | * @class AuthorizationRequestMiddleware |
| 43 | 43 | * @package Platine\OAuth2\Middleware |
| 44 | 44 | */ |
| 45 | -class AuthorizationRequestMiddleware implements MiddlewareInterface |
|
| 46 | -{ |
|
| 45 | +class AuthorizationRequestMiddleware implements MiddlewareInterface { |
|
| 47 | 46 | /** |
| 48 | 47 | * The authorization server instance |
| 49 | 48 | * @var AuthorizationServerInterface |
@@ -42,8 +42,7 @@ |
||
| 42 | 42 | * @class TokenRequestMiddleware |
| 43 | 43 | * @package Platine\OAuth2\Middleware |
| 44 | 44 | */ |
| 45 | -class TokenRequestMiddleware implements MiddlewareInterface |
|
| 46 | -{ |
|
| 45 | +class TokenRequestMiddleware implements MiddlewareInterface { |
|
| 47 | 46 | /** |
| 48 | 47 | * The authorization server instance |
| 49 | 48 | * @var AuthorizationServerInterface |
@@ -42,8 +42,7 @@ |
||
| 42 | 42 | * @class RevocationRequestMiddleware |
| 43 | 43 | * @package Platine\OAuth2\Middleware |
| 44 | 44 | */ |
| 45 | -class RevocationRequestMiddleware implements MiddlewareInterface |
|
| 46 | -{ |
|
| 45 | +class RevocationRequestMiddleware implements MiddlewareInterface { |
|
| 47 | 46 | /** |
| 48 | 47 | * The authorization server instance |
| 49 | 48 | * @var AuthorizationServerInterface |
@@ -52,8 +52,7 @@ |
||
| 52 | 52 | * @class ResourceServerMiddleware |
| 53 | 53 | * @package Platine\OAuth2\Middleware |
| 54 | 54 | */ |
| 55 | -class ResourceServerMiddleware implements MiddlewareInterface |
|
| 56 | -{ |
|
| 55 | +class ResourceServerMiddleware implements MiddlewareInterface { |
|
| 57 | 56 | /** |
| 58 | 57 | * The resource server instance |
| 59 | 58 | * @var ResourceServerInterface |
@@ -52,8 +52,7 @@ |
||
| 52 | 52 | * @class Configuration |
| 53 | 53 | * @package Platine\OAuth2 |
| 54 | 54 | */ |
| 55 | -class Configuration extends AbstractConfiguration |
|
| 56 | -{ |
|
| 55 | +class Configuration extends AbstractConfiguration { |
|
| 57 | 56 | /** |
| 58 | 57 | * Return the authorization code TTL value |
| 59 | 58 | * @return int |
@@ -11,22 +11,22 @@ discard block |
||
| 11 | 11 | { |
| 12 | 12 | public function up(): void |
| 13 | 13 | { |
| 14 | - //Action when migrate up |
|
| 14 | + //Action when migrate up |
|
| 15 | 15 | $this->create('oauth_authorization_codes', function (CreateTable $table) { |
| 16 | 16 | $table->string('authorization_code', 100) |
| 17 | - ->notNull() |
|
| 18 | - ->description('The authorization code') |
|
| 19 | - ->primary(); |
|
| 17 | + ->notNull() |
|
| 18 | + ->description('The authorization code') |
|
| 19 | + ->primary(); |
|
| 20 | 20 | |
| 21 | 21 | $table->string('redirect_uri', 2000) |
| 22 | - ->description('The client redirect uri'); |
|
| 22 | + ->description('The client redirect uri'); |
|
| 23 | 23 | |
| 24 | 24 | $table->string('scope', 2000) |
| 25 | - ->description('The authorization code scopes separated with space if many'); |
|
| 25 | + ->description('The authorization code scopes separated with space if many'); |
|
| 26 | 26 | |
| 27 | 27 | $table->datetime('expires') |
| 28 | - ->notNull() |
|
| 29 | - ->description('The authorization code expire time'); |
|
| 28 | + ->notNull() |
|
| 29 | + ->description('The authorization code expire time'); |
|
| 30 | 30 | |
| 31 | 31 | $table->integer('user_id') |
| 32 | 32 | ->description('The owner of authorization code'); |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | public function down(): void |
| 49 | 49 | { |
| 50 | - //Action when migrate down |
|
| 50 | + //Action when migrate down |
|
| 51 | 51 | $this->drop('oauth_authorization_codes'); |
| 52 | 52 | } |
| 53 | 53 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | public function up(): void |
| 13 | 13 | { |
| 14 | 14 | //Action when migrate up |
| 15 | - $this->create('oauth_authorization_codes', function (CreateTable $table) { |
|
| 15 | + $this->create('oauth_authorization_codes', function(CreateTable $table) { |
|
| 16 | 16 | $table->string('authorization_code', 100) |
| 17 | 17 | ->notNull() |
| 18 | 18 | ->description('The authorization code') |
@@ -7,8 +7,7 @@ |
||
| 7 | 7 | use Platine\Database\Schema\CreateTable; |
| 8 | 8 | use Platine\Framework\Migration\AbstractMigration; |
| 9 | 9 | |
| 10 | -class AddOauth2AuthorizationCodesTable20230802152529 extends AbstractMigration |
|
| 11 | -{ |
|
| 10 | +class AddOauth2AuthorizationCodesTable20230802152529 extends AbstractMigration { |
|
| 12 | 11 | public function up(): void |
| 13 | 12 | { |
| 14 | 13 | //Action when migrate up |