chore: copyright

This commit is contained in:
FoskyM 2023-09-29 14:49:12 +08:00
parent b6abfe9e3b
commit f67f167af7
No known key found for this signature in database
GPG key ID: 42C0ED6994AD7E9C
16 changed files with 122 additions and 0 deletions

View file

@ -1,5 +1,13 @@
<?php <?php
/*
* This file is part of foskym/flarum-oauth-center.
*
* Copyright (c) 2023 FoskyM.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Schema\Builder; use Illuminate\Database\Schema\Builder;

View file

@ -1,5 +1,13 @@
<?php <?php
/*
* This file is part of foskym/flarum-oauth-center.
*
* Copyright (c) 2023 FoskyM.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Schema\Builder; use Illuminate\Database\Schema\Builder;

View file

@ -1,5 +1,13 @@
<?php <?php
/*
* This file is part of foskym/flarum-oauth-center.
*
* Copyright (c) 2023 FoskyM.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Schema\Builder; use Illuminate\Database\Schema\Builder;

View file

@ -1,5 +1,13 @@
<?php <?php
/*
* This file is part of foskym/flarum-oauth-center.
*
* Copyright (c) 2023 FoskyM.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Schema\Builder; use Illuminate\Database\Schema\Builder;

View file

@ -1,5 +1,13 @@
<?php <?php
/*
* This file is part of foskym/flarum-oauth-center.
*
* Copyright (c) 2023 FoskyM.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Schema\Builder; use Illuminate\Database\Schema\Builder;

View file

@ -1,5 +1,13 @@
<?php <?php
/*
* This file is part of foskym/flarum-oauth-center.
*
* Copyright (c) 2023 FoskyM.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Schema\Builder; use Illuminate\Database\Schema\Builder;

View file

@ -1,5 +1,13 @@
<?php <?php
/*
* This file is part of foskym/flarum-oauth-center.
*
* Copyright (c) 2023 FoskyM.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
namespace FoskyM\OAuthCenter\Controllers; namespace FoskyM\OAuthCenter\Controllers;
use Flarum\User\User; use Flarum\User\User;
use Flarum\Http\RequestUtil; use Flarum\Http\RequestUtil;

View file

@ -6,6 +6,7 @@ use Flarum\Foundation\ErrorHandling\ExceptionHandler\IlluminateValidationExcepti
use Flarum\Foundation\ErrorHandling\JsonApiFormatter; use Flarum\Foundation\ErrorHandling\JsonApiFormatter;
use FoskyM\OAuthCenter\OAuth; use FoskyM\OAuthCenter\OAuth;
use FoskyM\OAuthCenter\Storage; use FoskyM\OAuthCenter\Storage;
use Illuminate\Support\Arr;
use Illuminate\Validation\ValidationException; use Illuminate\Validation\ValidationException;
use Psr\Http\Message\ResponseInterface as Response; use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request; use Psr\Http\Message\ServerRequestInterface as Request;

View file

@ -1,5 +1,13 @@
<?php <?php
/*
* This file is part of foskym/flarum-oauth-center.
*
* Copyright (c) 2023 FoskyM.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
namespace FoskyM\OAuthCenter\Models; namespace FoskyM\OAuthCenter\Models;
use Flarum\Database\AbstractModel; use Flarum\Database\AbstractModel;

View file

@ -1,5 +1,13 @@
<?php <?php
/*
* This file is part of foskym/flarum-oauth-center.
*
* Copyright (c) 2023 FoskyM.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
namespace FoskyM\OAuthCenter\Models; namespace FoskyM\OAuthCenter\Models;
use Flarum\Database\AbstractModel; use Flarum\Database\AbstractModel;

View file

@ -1,5 +1,13 @@
<?php <?php
/*
* This file is part of foskym/flarum-oauth-center.
*
* Copyright (c) 2023 FoskyM.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
namespace FoskyM\OAuthCenter\Models; namespace FoskyM\OAuthCenter\Models;
use Flarum\Database\AbstractModel; use Flarum\Database\AbstractModel;

View file

@ -1,5 +1,13 @@
<?php <?php
/*
* This file is part of foskym/flarum-oauth-center.
*
* Copyright (c) 2023 FoskyM.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
namespace FoskyM\OAuthCenter\Models; namespace FoskyM\OAuthCenter\Models;
use Flarum\Database\AbstractModel; use Flarum\Database\AbstractModel;

View file

@ -1,5 +1,13 @@
<?php <?php
/*
* This file is part of foskym/flarum-oauth-center.
*
* Copyright (c) 2023 FoskyM.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
namespace FoskyM\OAuthCenter\Models; namespace FoskyM\OAuthCenter\Models;
use Flarum\Database\AbstractModel; use Flarum\Database\AbstractModel;

View file

@ -1,5 +1,13 @@
<?php <?php
/*
* This file is part of foskym/flarum-oauth-center.
*
* Copyright (c) 2023 FoskyM.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
namespace FoskyM\OAuthCenter\Models; namespace FoskyM\OAuthCenter\Models;
use Flarum\Database\AbstractModel; use Flarum\Database\AbstractModel;

View file

@ -1,5 +1,13 @@
<?php <?php
/*
* This file is part of foskym/flarum-oauth-center.
*
* Copyright (c) 2023 FoskyM.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
namespace FoskyM\OAuthCenter; namespace FoskyM\OAuthCenter;
use OAuth2\Server; use OAuth2\Server;
@ -25,6 +33,7 @@ class OAuth
$storage = new Storage; $storage = new Storage;
$server = new Server($storage, array( $server = new Server($storage, array(
'allow_implicit' => true, 'allow_implicit' => true,
'enforce_state' => false
)); ));
$server->addGrantType(new AuthorizationCode($storage)); $server->addGrantType(new AuthorizationCode($storage));
$server->addGrantType(new ClientCredentials($storage)); $server->addGrantType(new ClientCredentials($storage));

View file

@ -1,5 +1,13 @@
<?php <?php
/*
* This file is part of foskym/flarum-oauth-center.
*
* Copyright (c) 2023 FoskyM.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
namespace FoskyM\OAuthCenter; namespace FoskyM\OAuthCenter;
use Flarum\Extend\Model; use Flarum\Extend\Model;
use Flarum\User\User; use Flarum\User\User;