@@ -11,20 +11,20 @@ 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_scopes', function (CreateTable $table) { |
| 16 | 16 | $table->integer('id') |
| 17 | - ->autoincrement() |
|
| 18 | - ->primary(); |
|
| 17 | + ->autoincrement() |
|
| 18 | + ->primary(); |
|
| 19 | 19 | |
| 20 | 20 | $table->string('name') |
| 21 | - ->notNull(); |
|
| 21 | + ->notNull(); |
|
| 22 | 22 | |
| 23 | 23 | $table->string('description'); |
| 24 | 24 | |
| 25 | 25 | $table->boolean('is_default') |
| 26 | - ->description('Whether is the default scope') |
|
| 27 | - ->notNull(); |
|
| 26 | + ->description('Whether is the default scope') |
|
| 27 | + ->notNull(); |
|
| 28 | 28 | |
| 29 | 29 | $table->timestamps(); |
| 30 | 30 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | public function down(): void |
| 36 | 36 | { |
| 37 | - //Action when migrate down |
|
| 37 | + //Action when migrate down |
|
| 38 | 38 | $this->drop('oauth_scopes'); |
| 39 | 39 | } |
| 40 | 40 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | public function up(): void |
| 13 | 13 | { |
| 14 | 14 | //Action when migrate up |
| 15 | - $this->create('oauth_scopes', function (CreateTable $table) { |
|
| 15 | + $this->create('oauth_scopes', function(CreateTable $table) { |
|
| 16 | 16 | $table->integer('id') |
| 17 | 17 | ->autoincrement() |
| 18 | 18 | ->primary(); |
@@ -7,8 +7,7 @@ |
||
| 7 | 7 | use Platine\Database\Schema\CreateTable; |
| 8 | 8 | use Platine\Framework\Migration\AbstractMigration; |
| 9 | 9 | |
| 10 | -class AddOauth2ScopesTable20230802144938 extends AbstractMigration |
|
| 11 | -{ |
|
| 10 | +class AddOauth2ScopesTable20230802144938 extends AbstractMigration { |
|
| 12 | 11 | public function up(): void |
| 13 | 12 | { |
| 14 | 13 | //Action when migrate up |
@@ -11,19 +11,19 @@ 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_refresh_tokens', function (CreateTable $table) { |
| 16 | 16 | $table->string('refresh_token', 100) |
| 17 | - ->notNull() |
|
| 18 | - ->description('The refresh token') |
|
| 19 | - ->primary(); |
|
| 17 | + ->notNull() |
|
| 18 | + ->description('The refresh token') |
|
| 19 | + ->primary(); |
|
| 20 | 20 | |
| 21 | 21 | $table->string('scope', 2000) |
| 22 | - ->description('The refresh token scopes separated with space if many'); |
|
| 22 | + ->description('The refresh token scopes separated with space if many'); |
|
| 23 | 23 | |
| 24 | 24 | $table->datetime('expires') |
| 25 | - ->notNull() |
|
| 26 | - ->description('The refresh token expire time'); |
|
| 25 | + ->notNull() |
|
| 26 | + ->description('The refresh token expire time'); |
|
| 27 | 27 | |
| 28 | 28 | $table->integer('user_id') |
| 29 | 29 | ->description('The owner of refresh token'); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | public function down(): void |
| 46 | 46 | { |
| 47 | - //Action when migrate down |
|
| 47 | + //Action when migrate down |
|
| 48 | 48 | $this->drop('oauth_refresh_tokens'); |
| 49 | 49 | } |
| 50 | 50 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | public function up(): void |
| 13 | 13 | { |
| 14 | 14 | //Action when migrate up |
| 15 | - $this->create('oauth_refresh_tokens', function (CreateTable $table) { |
|
| 15 | + $this->create('oauth_refresh_tokens', function(CreateTable $table) { |
|
| 16 | 16 | $table->string('refresh_token', 100) |
| 17 | 17 | ->notNull() |
| 18 | 18 | ->description('The refresh token') |
@@ -7,8 +7,7 @@ |
||
| 7 | 7 | use Platine\Database\Schema\CreateTable; |
| 8 | 8 | use Platine\Framework\Migration\AbstractMigration; |
| 9 | 9 | |
| 10 | -class AddOauth2RefreshTokensTable20230802152020 extends AbstractMigration |
|
| 11 | -{ |
|
| 10 | +class AddOauth2RefreshTokensTable20230802152020 extends AbstractMigration { |
|
| 12 | 11 | public function up(): void |
| 13 | 12 | { |
| 14 | 13 | //Action when migrate up |
@@ -11,19 +11,19 @@ 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_access_tokens', function (CreateTable $table) { |
| 16 | 16 | $table->string('access_token', 100) |
| 17 | - ->notNull() |
|
| 18 | - ->description('The access token') |
|
| 19 | - ->primary(); |
|
| 17 | + ->notNull() |
|
| 18 | + ->description('The access token') |
|
| 19 | + ->primary(); |
|
| 20 | 20 | |
| 21 | 21 | $table->string('scope', 2000) |
| 22 | - ->description('The access token scopes separated with space if many'); |
|
| 22 | + ->description('The access token scopes separated with space if many'); |
|
| 23 | 23 | |
| 24 | 24 | $table->datetime('expires') |
| 25 | - ->notNull() |
|
| 26 | - ->description('The access token expire time'); |
|
| 25 | + ->notNull() |
|
| 26 | + ->description('The access token expire time'); |
|
| 27 | 27 | |
| 28 | 28 | $table->integer('user_id') |
| 29 | 29 | ->description('The owner of access token'); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | public function down(): void |
| 46 | 46 | { |
| 47 | - //Action when migrate down |
|
| 47 | + //Action when migrate down |
|
| 48 | 48 | $this->drop('oauth_access_tokens'); |
| 49 | 49 | } |
| 50 | 50 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | public function up(): void |
| 13 | 13 | { |
| 14 | 14 | //Action when migrate up |
| 15 | - $this->create('oauth_access_tokens', function (CreateTable $table) { |
|
| 15 | + $this->create('oauth_access_tokens', function(CreateTable $table) { |
|
| 16 | 16 | $table->string('access_token', 100) |
| 17 | 17 | ->notNull() |
| 18 | 18 | ->description('The access token') |
@@ -7,8 +7,7 @@ |
||
| 7 | 7 | use Platine\Database\Schema\CreateTable; |
| 8 | 8 | use Platine\Framework\Migration\AbstractMigration; |
| 9 | 9 | |
| 10 | -class AddOauth2AccessTokensTable20230802151233 extends AbstractMigration |
|
| 11 | -{ |
|
| 10 | +class AddOauth2AccessTokensTable20230802151233 extends AbstractMigration { |
|
| 12 | 11 | public function up(): void |
| 13 | 12 | { |
| 14 | 13 | //Action when migrate up |
@@ -11,29 +11,29 @@ 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_clients', function (CreateTable $table) { |
| 16 | 16 | $table->string('id', 100) |
| 17 | - ->notNull() |
|
| 18 | - ->description('The client id') |
|
| 19 | - ->primary(); |
|
| 17 | + ->notNull() |
|
| 18 | + ->description('The client id') |
|
| 19 | + ->primary(); |
|
| 20 | 20 | |
| 21 | 21 | $table->string('name', 80) |
| 22 | - ->description('The client or app name') |
|
| 23 | - ->notNull(); |
|
| 22 | + ->description('The client or app name') |
|
| 23 | + ->notNull(); |
|
| 24 | 24 | |
| 25 | 25 | $table->string('secret', 80) |
| 26 | - ->description('The client secret must be null for public client'); |
|
| 26 | + ->description('The client secret must be null for public client'); |
|
| 27 | 27 | |
| 28 | 28 | $table->string('redirect_uri', 2000) |
| 29 | - ->notNull() |
|
| 30 | - ->description('The client redirect uri separated with space if many'); |
|
| 29 | + ->notNull() |
|
| 30 | + ->description('The client redirect uri separated with space if many'); |
|
| 31 | 31 | |
| 32 | 32 | $table->string('scope', 2000) |
| 33 | - ->description('The client scopes separated with space if many'); |
|
| 33 | + ->description('The client scopes separated with space if many'); |
|
| 34 | 34 | |
| 35 | 35 | $table->string('grant_types', 100) |
| 36 | - ->description('The client supported grant types separated with space if many'); |
|
| 36 | + ->description('The client supported grant types separated with space if many'); |
|
| 37 | 37 | |
| 38 | 38 | $table->integer('user_id') |
| 39 | 39 | ->description('The owner or client developer'); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | public function down(): void |
| 48 | 48 | { |
| 49 | - //Action when migrate down |
|
| 49 | + //Action when migrate down |
|
| 50 | 50 | $this->drop('oauth_clients'); |
| 51 | 51 | } |
| 52 | 52 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | public function up(): void |
| 13 | 13 | { |
| 14 | 14 | //Action when migrate up |
| 15 | - $this->create('oauth_clients', function (CreateTable $table) { |
|
| 15 | + $this->create('oauth_clients', function(CreateTable $table) { |
|
| 16 | 16 | $table->string('id', 100) |
| 17 | 17 | ->notNull() |
| 18 | 18 | ->description('The client id') |
@@ -7,8 +7,7 @@ |
||
| 7 | 7 | use Platine\Database\Schema\CreateTable; |
| 8 | 8 | use Platine\Framework\Migration\AbstractMigration; |
| 9 | 9 | |
| 10 | -class AddOauth2ClientsTable20230802150106 extends AbstractMigration |
|
| 11 | -{ |
|
| 10 | +class AddOauth2ClientsTable20230802150106 extends AbstractMigration { |
|
| 12 | 11 | public function up(): void |
| 13 | 12 | { |
| 14 | 13 | //Action when migrate up |
@@ -38,14 +38,12 @@ |
||
| 38 | 38 | * @class OAuthRedirectResponse |
| 39 | 39 | * @package Platine\OAuth2\Response |
| 40 | 40 | */ |
| 41 | -class OAuthRedirectResponse extends Response |
|
| 42 | -{ |
|
| 41 | +class OAuthRedirectResponse extends Response { |
|
| 43 | 42 | /** |
| 44 | 43 | * Create new instance |
| 45 | 44 | * @param string $uri |
| 46 | 45 | */ |
| 47 | - public function __construct(string $uri = '/') |
|
| 48 | - { |
|
| 46 | + public function __construct(string $uri = '/') { |
|
| 49 | 47 | parent::__construct(302); |
| 50 | 48 | $this->headers['location'] = [$uri]; |
| 51 | 49 | } |
@@ -39,8 +39,7 @@ |
||
| 39 | 39 | * @class OAuthJsonResponse |
| 40 | 40 | * @package Platine\OAuth2\Response |
| 41 | 41 | */ |
| 42 | -class OAuthJsonResponse extends Response |
|
| 43 | -{ |
|
| 42 | +class OAuthJsonResponse extends Response { |
|
| 44 | 43 | /** |
| 45 | 44 | * Create new instance |
| 46 | 45 | * @param mixed $data |
@@ -52,8 +52,7 @@ |
||
| 52 | 52 | * @class AuthorizationServer |
| 53 | 53 | * @package Platine\OAuth2 |
| 54 | 54 | */ |
| 55 | -class AuthorizationServer implements AuthorizationServerInterface |
|
| 56 | -{ |
|
| 55 | +class AuthorizationServer implements AuthorizationServerInterface { |
|
| 57 | 56 | /** |
| 58 | 57 | * The grant list |
| 59 | 58 | * @var array<string, GrantInterface> |
@@ -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 | * Create new instance |
| 49 | 48 | * @param AuthorizationServerInterface $authorizationServer |
@@ -53,8 +53,7 @@ |
||
| 53 | 53 | * @class ResourceServerMiddleware |
| 54 | 54 | * @package Platine\OAuth2\Middleware |
| 55 | 55 | */ |
| 56 | -class ResourceServerMiddleware implements MiddlewareInterface |
|
| 57 | -{ |
|
| 56 | +class ResourceServerMiddleware implements MiddlewareInterface { |
|
| 58 | 57 | /** |
| 59 | 58 | * Create new instance |
| 60 | 59 | * @param ResourceServerInterface $resourceServer |