From a50023a351c1f5b2fcaa5423089168475c31ff46 Mon Sep 17 00:00:00 2001 From: Eric Schricker Date: Tue, 21 Sep 2021 09:26:40 +0200 Subject: [PATCH] changed namespace to PHPOpenSourceSaver --- .github/FUNDING.yml | 2 +- composer.json | 30 +++++----- config/config.php | 6 +- docs/auth-guard.md | 4 +- docs/laravel-installation.md | 4 +- docs/lumen-installation.md | 2 +- docs/quick-start.md | 4 +- src/Blacklist.php | 22 +++---- src/Claims/Audience.php | 2 +- src/Claims/Claim.php | 6 +- src/Claims/Collection.php | 4 +- src/Claims/Custom.php | 2 +- src/Claims/DatetimeTrait.php | 8 +-- src/Claims/Expiration.php | 4 +- src/Claims/Factory.php | 8 +-- src/Claims/IssuedAt.php | 8 +-- src/Claims/Issuer.php | 2 +- src/Claims/JwtId.php | 2 +- src/Claims/NotBefore.php | 4 +- src/Claims/Subject.php | 2 +- src/Console/JWTGenerateSecretCommand.php | 2 +- src/Contracts/Claim.php | 4 +- src/Contracts/Http/Parser.php | 2 +- src/Contracts/JWTSubject.php | 2 +- src/Contracts/Providers/Auth.php | 2 +- src/Contracts/Providers/JWT.php | 2 +- src/Contracts/Providers/Storage.php | 2 +- src/Contracts/Validator.php | 2 +- src/Exceptions/InvalidClaimException.php | 6 +- src/Exceptions/JWTException.php | 2 +- src/Exceptions/PayloadException.php | 2 +- src/Exceptions/TokenBlacklistedException.php | 2 +- src/Exceptions/TokenExpiredException.php | 2 +- src/Exceptions/TokenInvalidException.php | 2 +- src/Exceptions/UserNotDefinedException.php | 2 +- src/Facades/JWTAuth.php | 2 +- src/Facades/JWTFactory.php | 2 +- src/Facades/JWTProvider.php | 2 +- src/Factory.php | 36 ++++++------ src/Http/Middleware/Authenticate.php | 2 +- src/Http/Middleware/AuthenticateAndRenew.php | 2 +- src/Http/Middleware/BaseMiddleware.php | 10 ++-- src/Http/Middleware/Check.php | 2 +- src/Http/Middleware/RefreshToken.php | 4 +- src/Http/Parser/AuthHeaders.php | 4 +- src/Http/Parser/Cookies.php | 4 +- src/Http/Parser/InputSource.php | 4 +- src/Http/Parser/KeyTrait.php | 2 +- src/Http/Parser/LumenRouteParams.php | 2 +- src/Http/Parser/Parser.php | 4 +- src/Http/Parser/QueryString.php | 4 +- src/Http/Parser/RouteParams.php | 4 +- src/JWT.php | 58 +++++++++---------- src/JWTAuth.php | 20 +++---- src/JWTGuard.php | 28 ++++----- src/Manager.php | 50 ++++++++-------- src/Payload.php | 28 ++++----- src/Providers/AbstractServiceProvider.php | 46 +++++++-------- src/Providers/Auth/Illuminate.php | 4 +- src/Providers/JWT/Lcobucci.php | 14 ++--- src/Providers/JWT/Namshi.php | 12 ++-- src/Providers/JWT/Provider.php | 4 +- src/Providers/LaravelServiceProvider.php | 6 +- src/Providers/LumenServiceProvider.php | 4 +- src/Providers/Storage/Illuminate.php | 4 +- src/Support/CustomClaims.php | 2 +- src/Support/RefreshFlow.php | 2 +- src/Support/Utils.php | 2 +- src/Token.php | 4 +- src/Validators/PayloadValidator.php | 28 ++++----- src/Validators/TokenValidator.php | 6 +- src/Validators/Validator.php | 8 +-- tests/AbstractTestCase.php | 2 +- tests/BlacklistTest.php | 30 +++++----- tests/Claims/ClaimTest.php | 10 ++-- tests/Claims/CollectionTest.php | 18 +++--- tests/Claims/DatetimeClaimTest.php | 24 ++++---- tests/Claims/FactoryTest.php | 24 ++++---- tests/Claims/IssuedAtTest.php | 8 +-- tests/Claims/NotBeforeTest.php | 8 +-- tests/FactoryTest.php | 32 +++++----- tests/Fixtures/Foo.php | 4 +- tests/Http/ParserTest.php | 20 +++---- tests/JWTAuthTest.php | 44 +++++++------- tests/JWTGuardTest.php | 28 ++++----- tests/ManagerTest.php | 42 +++++++------- tests/Middleware/AbstractMiddlewareTest.php | 8 +-- tests/Middleware/AuthenticateAndRenewTest.php | 12 ++-- tests/Middleware/AuthenticateTest.php | 12 ++-- tests/Middleware/CheckTest.php | 12 ++-- tests/Middleware/RefreshTokenTest.php | 10 ++-- tests/PayloadTest.php | 32 +++++----- tests/Providers/Auth/IlluminateTest.php | 8 +-- tests/Providers/JWT/LcobucciTest.php | 12 ++-- tests/Providers/JWT/NamshiTest.php | 12 ++-- tests/Providers/JWT/ProviderTest.php | 8 +-- tests/Providers/Storage/IlluminateTest.php | 10 ++-- tests/Stubs/JWTProviderStub.php | 4 +- tests/Stubs/LaravelUserStub.php | 4 +- tests/Stubs/TaggedStorage.php | 4 +- tests/Stubs/UserStub.php | 4 +- tests/TokenTest.php | 6 +- tests/Validators/PayloadValidatorTest.php | 30 +++++----- tests/Validators/TokenValidatorTest.php | 18 +++--- 104 files changed, 541 insertions(+), 541 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index f8e7c15a..5b728772 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,7 +1,7 @@ # These are supported funding model platforms github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: seantymon +patreon: open_collective: # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel diff --git a/composer.json b/composer.json index a15b39bf..dfa654da 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "tymon/jwt-auth", + "name": "php-open-source-saver/jwt-auth", "description": "JSON Web Token Authentication for Laravel and Lumen", "keywords": [ "auth", @@ -8,10 +8,10 @@ "jwt", "laravel" ], - "homepage": "https://github.com/tymondesigns/jwt-auth", + "homepage": "https://github.com/PHP-Open-Source-Saver/jwt-auth", "support": { - "issues": "https://github.com/tymondesigns/jwt-auth/issues", - "source": "https://github.com/tymondesigns/jwt-auth" + "issues": "https://github.com/PHP-Open-Source-Saver/jwt-auth/issues", + "source": "https://github.com/PHP-Open-Source-Saver/jwt-auth" }, "license": "MIT", "authors": [ @@ -20,6 +20,11 @@ "email": "tymon148@gmail.com", "homepage": "https://tymon.xyz", "role": "Developer" + }, + { + "name": "Eric Schricker", + "email": "eric.schricker@adiutabyte.de", + "role": "Developer" } ], "require": { @@ -42,12 +47,12 @@ }, "autoload": { "psr-4": { - "Tymon\\JWTAuth\\": "src/" + "PHPOpenSourceSaver\\JWTAuth\\": "src/" } }, "autoload-dev": { "psr-4": { - "Tymon\\JWTAuth\\Test\\": "tests/" + "PHPOpenSourceSaver\\JWTAuth\\Test\\": "tests/" } }, "extra": { @@ -56,20 +61,15 @@ }, "laravel": { "aliases": { - "JWTAuth": "Tymon\\JWTAuth\\Facades\\JWTAuth", - "JWTFactory": "Tymon\\JWTAuth\\Facades\\JWTFactory" + "JWTAuth": "PHPOpenSourceSaver\\JWTAuth\\Facades\\JWTAuth", + "JWTFactory": "PHPOpenSourceSaver\\JWTAuth\\Facades\\JWTFactory" }, "providers": [ - "Tymon\\JWTAuth\\Providers\\LaravelServiceProvider" + "PHPOpenSourceSaver\\JWTAuth\\Providers\\LaravelServiceProvider" ] } }, - "funding": [ - { - "type": "patreon", - "url": "https://www.patreon.com/seantymon" - } - ], + "funding": [], "config": { "sort-packages": true }, diff --git a/config/config.php b/config/config.php index 8b7843b6..468c1c7f 100644 --- a/config/config.php +++ b/config/config.php @@ -275,7 +275,7 @@ | */ - 'jwt' => Tymon\JWTAuth\Providers\JWT\Lcobucci::class, + 'jwt' => PHPOpenSourceSaver\JWTAuth\Providers\JWT\Lcobucci::class, /* |-------------------------------------------------------------------------- @@ -286,7 +286,7 @@ | */ - 'auth' => Tymon\JWTAuth\Providers\Auth\Illuminate::class, + 'auth' => PHPOpenSourceSaver\JWTAuth\Providers\Auth\Illuminate::class, /* |-------------------------------------------------------------------------- @@ -297,7 +297,7 @@ | */ - 'storage' => Tymon\JWTAuth\Providers\Storage\Illuminate::class, + 'storage' => PHPOpenSourceSaver\JWTAuth\Providers\Storage\Illuminate::class, ], diff --git a/docs/auth-guard.md b/docs/auth-guard.md index 75fa7e60..f6a3f54b 100644 --- a/docs/auth-guard.md +++ b/docs/auth-guard.md @@ -52,13 +52,13 @@ Get the currently authenticated user or throw an exception. ```php try { $user = auth()->userOrFail(); -} catch (\Tymon\JWTAuth\Exceptions\UserNotDefinedException $e) { +} catch (\PHPOpenSourceSaver\JWTAuth\Exceptions\UserNotDefinedException $e) { // do something } ``` -If the user is not set, then a `Tymon\JWTAuth\Exceptions\UserNotDefinedException` will be thrown +If the user is not set, then a `PHPOpenSourceSaver\JWTAuth\Exceptions\UserNotDefinedException` will be thrown ### logout() diff --git a/docs/laravel-installation.md b/docs/laravel-installation.md index 2d473cdb..4f8800a1 100644 --- a/docs/laravel-installation.md +++ b/docs/laravel-installation.md @@ -17,7 +17,7 @@ Add the service provider to the `providers` array in the `config/app.php` config ... - Tymon\JWTAuth\Providers\LaravelServiceProvider::class, + PHPOpenSourceSaver\JWTAuth\Providers\LaravelServiceProvider::class, ] ``` @@ -28,7 +28,7 @@ Add the service provider to the `providers` array in the `config/app.php` config Run the following command to publish the package config file: ```bash -php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider" +php artisan vendor:publish --provider="PHPOpenSourceSaver\JWTAuth\Providers\LaravelServiceProvider" ``` You should now have a `config/jwt.php` file that allows you to configure the basics of this package. diff --git a/docs/lumen-installation.md b/docs/lumen-installation.md index 8698e783..87d4c4cf 100644 --- a/docs/lumen-installation.md +++ b/docs/lumen-installation.md @@ -29,7 +29,7 @@ Add the following snippet to the `bootstrap/app.php` file under the providers se $app->register(App\Providers\AuthServiceProvider::class); // Add this line -$app->register(Tymon\JWTAuth\Providers\LumenServiceProvider::class); +$app->register(PHPOpenSourceSaver\JWTAuth\Providers\LumenServiceProvider::class); ``` Then uncomment the `auth` middleware in the same file: diff --git a/docs/quick-start.md b/docs/quick-start.md index 9a7b3f11..c1843746 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -3,7 +3,7 @@ Before continuing, make sure you have installed the package as per the installat ### Update your User model -Firstly you need to implement the `Tymon\JWTAuth\Contracts\JWTSubject` contract on your User model, +Firstly you need to implement the `PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject` contract on your User model, which requires that you implement the 2 methods `getJWTIdentifier()` and `getJWTCustomClaims()`. The example below should give you an idea of how this could look. Obviously you should make any @@ -14,7 +14,7 @@ changes, as necessary, to suit your own needs. namespace App; -use Tymon\JWTAuth\Contracts\JWTSubject; +use PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject; use Illuminate\Notifications\Notifiable; use Illuminate\Foundation\Auth\User as Authenticatable; diff --git a/src/Blacklist.php b/src/Blacklist.php index 5a3f546d..c8f90823 100644 --- a/src/Blacklist.php +++ b/src/Blacklist.php @@ -9,17 +9,17 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth; +namespace PHPOpenSourceSaver\JWTAuth; -use Tymon\JWTAuth\Contracts\Providers\Storage; -use Tymon\JWTAuth\Support\Utils; +use PHPOpenSourceSaver\JWTAuth\Contracts\Providers\Storage; +use PHPOpenSourceSaver\JWTAuth\Support\Utils; class Blacklist { /** * The storage. * - * @var \Tymon\JWTAuth\Contracts\Providers\Storage + * @var \PHPOpenSourceSaver\JWTAuth\Contracts\Providers\Storage */ protected $storage; @@ -47,7 +47,7 @@ class Blacklist /** * Constructor. * - * @param \Tymon\JWTAuth\Contracts\Providers\Storage $storage + * @param \PHPOpenSourceSaver\JWTAuth\Contracts\Providers\Storage $storage * * @return void */ @@ -59,7 +59,7 @@ public function __construct(Storage $storage) /** * Add the token (jti claim) to the blacklist. * - * @param \Tymon\JWTAuth\Payload $payload + * @param \PHPOpenSourceSaver\JWTAuth\Payload $payload * * @return bool */ @@ -88,7 +88,7 @@ public function add(Payload $payload) /** * Get the number of minutes until the token expiry. * - * @param \Tymon\JWTAuth\Payload $payload + * @param \PHPOpenSourceSaver\JWTAuth\Payload $payload * * @return int */ @@ -106,7 +106,7 @@ protected function getMinutesUntilExpired(Payload $payload) /** * Add the token (jti claim) to the blacklist indefinitely. * - * @param \Tymon\JWTAuth\Payload $payload + * @param \PHPOpenSourceSaver\JWTAuth\Payload $payload * * @return bool */ @@ -120,7 +120,7 @@ public function addForever(Payload $payload) /** * Determine whether the token has been blacklisted. * - * @param \Tymon\JWTAuth\Payload $payload + * @param \PHPOpenSourceSaver\JWTAuth\Payload $payload * * @return bool */ @@ -140,7 +140,7 @@ public function has(Payload $payload) /** * Remove the token (jti claim) from the blacklist. * - * @param \Tymon\JWTAuth\Payload $payload + * @param \PHPOpenSourceSaver\JWTAuth\Payload $payload * * @return bool */ @@ -199,7 +199,7 @@ public function getGracePeriod() /** * Get the unique key held within the blacklist. * - * @param \Tymon\JWTAuth\Payload $payload + * @param \PHPOpenSourceSaver\JWTAuth\Payload $payload * * @return mixed */ diff --git a/src/Claims/Audience.php b/src/Claims/Audience.php index b3447755..a4ce7a95 100644 --- a/src/Claims/Audience.php +++ b/src/Claims/Audience.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Claims; +namespace PHPOpenSourceSaver\JWTAuth\Claims; class Audience extends Claim { diff --git a/src/Claims/Claim.php b/src/Claims/Claim.php index d1721fbf..be911998 100644 --- a/src/Claims/Claim.php +++ b/src/Claims/Claim.php @@ -9,12 +9,12 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Claims; +namespace PHPOpenSourceSaver\JWTAuth\Claims; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Contracts\Support\Jsonable; use JsonSerializable; -use Tymon\JWTAuth\Contracts\Claim as ClaimContract; +use PHPOpenSourceSaver\JWTAuth\Contracts\Claim as ClaimContract; abstract class Claim implements Arrayable, ClaimContract, Jsonable, JsonSerializable { @@ -47,7 +47,7 @@ public function __construct($value) * * @param mixed $value * - * @throws \Tymon\JWTAuth\Exceptions\InvalidClaimException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\InvalidClaimException * * @return $this */ diff --git a/src/Claims/Collection.php b/src/Claims/Collection.php index 3199dca7..cbf5da87 100644 --- a/src/Claims/Collection.php +++ b/src/Claims/Collection.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Claims; +namespace PHPOpenSourceSaver\JWTAuth\Claims; use Illuminate\Support\Collection as IlluminateCollection; use Illuminate\Support\Str; @@ -35,7 +35,7 @@ public function __construct($items = []) * @param callable $callback * @param mixed $default * - * @return \Tymon\JWTAuth\Claims\Claim + * @return \PHPOpenSourceSaver\JWTAuth\Claims\Claim */ public function getByClaimName($name, callable $callback = null, $default = null) { diff --git a/src/Claims/Custom.php b/src/Claims/Custom.php index 0e43de54..eef5b0c5 100644 --- a/src/Claims/Custom.php +++ b/src/Claims/Custom.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Claims; +namespace PHPOpenSourceSaver\JWTAuth\Claims; class Custom extends Claim { diff --git a/src/Claims/DatetimeTrait.php b/src/Claims/DatetimeTrait.php index dbda1e3c..556f02b0 100644 --- a/src/Claims/DatetimeTrait.php +++ b/src/Claims/DatetimeTrait.php @@ -9,12 +9,12 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Claims; +namespace PHPOpenSourceSaver\JWTAuth\Claims; use DateInterval; use DateTimeInterface; -use Tymon\JWTAuth\Exceptions\InvalidClaimException; -use Tymon\JWTAuth\Support\Utils; +use PHPOpenSourceSaver\JWTAuth\Exceptions\InvalidClaimException; +use PHPOpenSourceSaver\JWTAuth\Support\Utils; trait DatetimeTrait { @@ -30,7 +30,7 @@ trait DatetimeTrait * * @param mixed $value * - * @throws \Tymon\JWTAuth\Exceptions\InvalidClaimException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\InvalidClaimException * * @return $this */ diff --git a/src/Claims/Expiration.php b/src/Claims/Expiration.php index d15d4b24..cb50f78f 100644 --- a/src/Claims/Expiration.php +++ b/src/Claims/Expiration.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Claims; +namespace PHPOpenSourceSaver\JWTAuth\Claims; -use Tymon\JWTAuth\Exceptions\TokenExpiredException; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenExpiredException; class Expiration extends Claim { diff --git a/src/Claims/Factory.php b/src/Claims/Factory.php index 0fc6fa6d..36488187 100644 --- a/src/Claims/Factory.php +++ b/src/Claims/Factory.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Claims; +namespace PHPOpenSourceSaver\JWTAuth\Claims; use Illuminate\Http\Request; use Illuminate\Support\Str; -use Tymon\JWTAuth\Support\Utils; +use PHPOpenSourceSaver\JWTAuth\Support\Utils; class Factory { @@ -71,7 +71,7 @@ public function __construct(Request $request) * @param string $name * @param mixed $value * - * @return \Tymon\JWTAuth\Claims\Claim + * @return \PHPOpenSourceSaver\JWTAuth\Claims\Claim */ public function get($name, $value) { @@ -103,7 +103,7 @@ public function has($name) * * @param string $name * - * @return \Tymon\JWTAuth\Claims\Claim + * @return \PHPOpenSourceSaver\JWTAuth\Claims\Claim */ public function make($name) { diff --git a/src/Claims/IssuedAt.php b/src/Claims/IssuedAt.php index 6253fe88..b86a2205 100644 --- a/src/Claims/IssuedAt.php +++ b/src/Claims/IssuedAt.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Claims; +namespace PHPOpenSourceSaver\JWTAuth\Claims; -use Tymon\JWTAuth\Exceptions\InvalidClaimException; -use Tymon\JWTAuth\Exceptions\TokenExpiredException; -use Tymon\JWTAuth\Exceptions\TokenInvalidException; +use PHPOpenSourceSaver\JWTAuth\Exceptions\InvalidClaimException; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenExpiredException; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenInvalidException; class IssuedAt extends Claim { diff --git a/src/Claims/Issuer.php b/src/Claims/Issuer.php index d1d68cde..23c3922d 100644 --- a/src/Claims/Issuer.php +++ b/src/Claims/Issuer.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Claims; +namespace PHPOpenSourceSaver\JWTAuth\Claims; class Issuer extends Claim { diff --git a/src/Claims/JwtId.php b/src/Claims/JwtId.php index e1b93fc9..d59c2056 100644 --- a/src/Claims/JwtId.php +++ b/src/Claims/JwtId.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Claims; +namespace PHPOpenSourceSaver\JWTAuth\Claims; class JwtId extends Claim { diff --git a/src/Claims/NotBefore.php b/src/Claims/NotBefore.php index 3a23538f..89209932 100644 --- a/src/Claims/NotBefore.php +++ b/src/Claims/NotBefore.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Claims; +namespace PHPOpenSourceSaver\JWTAuth\Claims; -use Tymon\JWTAuth\Exceptions\TokenInvalidException; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenInvalidException; class NotBefore extends Claim { diff --git a/src/Claims/Subject.php b/src/Claims/Subject.php index 8ecb93d8..f0b511f9 100644 --- a/src/Claims/Subject.php +++ b/src/Claims/Subject.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Claims; +namespace PHPOpenSourceSaver\JWTAuth\Claims; class Subject extends Claim { diff --git a/src/Console/JWTGenerateSecretCommand.php b/src/Console/JWTGenerateSecretCommand.php index 93f91647..69760a57 100644 --- a/src/Console/JWTGenerateSecretCommand.php +++ b/src/Console/JWTGenerateSecretCommand.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Console; +namespace PHPOpenSourceSaver\JWTAuth\Console; use Illuminate\Console\Command; use Illuminate\Support\Str; diff --git a/src/Contracts/Claim.php b/src/Contracts/Claim.php index 9d6e9a94..50996238 100644 --- a/src/Contracts/Claim.php +++ b/src/Contracts/Claim.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Contracts; +namespace PHPOpenSourceSaver\JWTAuth\Contracts; interface Claim { @@ -18,7 +18,7 @@ interface Claim * * @param mixed $value * - * @throws \Tymon\JWTAuth\Exceptions\InvalidClaimException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\InvalidClaimException * * @return $this */ diff --git a/src/Contracts/Http/Parser.php b/src/Contracts/Http/Parser.php index c1faa333..0876bfac 100644 --- a/src/Contracts/Http/Parser.php +++ b/src/Contracts/Http/Parser.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Contracts\Http; +namespace PHPOpenSourceSaver\JWTAuth\Contracts\Http; use Illuminate\Http\Request; diff --git a/src/Contracts/JWTSubject.php b/src/Contracts/JWTSubject.php index bbd09ca7..07da0a39 100644 --- a/src/Contracts/JWTSubject.php +++ b/src/Contracts/JWTSubject.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Contracts; +namespace PHPOpenSourceSaver\JWTAuth\Contracts; interface JWTSubject { diff --git a/src/Contracts/Providers/Auth.php b/src/Contracts/Providers/Auth.php index 553d4021..9ffb4348 100644 --- a/src/Contracts/Providers/Auth.php +++ b/src/Contracts/Providers/Auth.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Contracts\Providers; +namespace PHPOpenSourceSaver\JWTAuth\Contracts\Providers; interface Auth { diff --git a/src/Contracts/Providers/JWT.php b/src/Contracts/Providers/JWT.php index 7065a879..afb824d3 100644 --- a/src/Contracts/Providers/JWT.php +++ b/src/Contracts/Providers/JWT.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Contracts\Providers; +namespace PHPOpenSourceSaver\JWTAuth\Contracts\Providers; interface JWT { diff --git a/src/Contracts/Providers/Storage.php b/src/Contracts/Providers/Storage.php index 5a0ed6d8..74affad0 100644 --- a/src/Contracts/Providers/Storage.php +++ b/src/Contracts/Providers/Storage.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Contracts\Providers; +namespace PHPOpenSourceSaver\JWTAuth\Contracts\Providers; interface Storage { diff --git a/src/Contracts/Validator.php b/src/Contracts/Validator.php index c9ae3de0..3b42b6c5 100644 --- a/src/Contracts/Validator.php +++ b/src/Contracts/Validator.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Contracts; +namespace PHPOpenSourceSaver\JWTAuth\Contracts; interface Validator { diff --git a/src/Exceptions/InvalidClaimException.php b/src/Exceptions/InvalidClaimException.php index 7a17feb7..f77d6653 100644 --- a/src/Exceptions/InvalidClaimException.php +++ b/src/Exceptions/InvalidClaimException.php @@ -9,17 +9,17 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Exceptions; +namespace PHPOpenSourceSaver\JWTAuth\Exceptions; use Exception; -use Tymon\JWTAuth\Claims\Claim; +use PHPOpenSourceSaver\JWTAuth\Claims\Claim; class InvalidClaimException extends JWTException { /** * Constructor. * - * @param \Tymon\JWTAuth\Claims\Claim $claim + * @param \PHPOpenSourceSaver\JWTAuth\Claims\Claim $claim * @param int $code * @param \Exception|null $previous * diff --git a/src/Exceptions/JWTException.php b/src/Exceptions/JWTException.php index 0f6ef80a..0c22f7a2 100644 --- a/src/Exceptions/JWTException.php +++ b/src/Exceptions/JWTException.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Exceptions; +namespace PHPOpenSourceSaver\JWTAuth\Exceptions; use Exception; diff --git a/src/Exceptions/PayloadException.php b/src/Exceptions/PayloadException.php index dfcc69f2..7d0ed186 100644 --- a/src/Exceptions/PayloadException.php +++ b/src/Exceptions/PayloadException.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Exceptions; +namespace PHPOpenSourceSaver\JWTAuth\Exceptions; class PayloadException extends JWTException { diff --git a/src/Exceptions/TokenBlacklistedException.php b/src/Exceptions/TokenBlacklistedException.php index f53de8a1..ddff802d 100644 --- a/src/Exceptions/TokenBlacklistedException.php +++ b/src/Exceptions/TokenBlacklistedException.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Exceptions; +namespace PHPOpenSourceSaver\JWTAuth\Exceptions; class TokenBlacklistedException extends TokenInvalidException { diff --git a/src/Exceptions/TokenExpiredException.php b/src/Exceptions/TokenExpiredException.php index 99d466c0..347e2e98 100644 --- a/src/Exceptions/TokenExpiredException.php +++ b/src/Exceptions/TokenExpiredException.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Exceptions; +namespace PHPOpenSourceSaver\JWTAuth\Exceptions; class TokenExpiredException extends JWTException { diff --git a/src/Exceptions/TokenInvalidException.php b/src/Exceptions/TokenInvalidException.php index 8c6ced47..38eda4c7 100644 --- a/src/Exceptions/TokenInvalidException.php +++ b/src/Exceptions/TokenInvalidException.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Exceptions; +namespace PHPOpenSourceSaver\JWTAuth\Exceptions; class TokenInvalidException extends JWTException { diff --git a/src/Exceptions/UserNotDefinedException.php b/src/Exceptions/UserNotDefinedException.php index 658713c9..253a05f2 100644 --- a/src/Exceptions/UserNotDefinedException.php +++ b/src/Exceptions/UserNotDefinedException.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Exceptions; +namespace PHPOpenSourceSaver\JWTAuth\Exceptions; class UserNotDefinedException extends JWTException { diff --git a/src/Facades/JWTAuth.php b/src/Facades/JWTAuth.php index 419b5903..e6b7345e 100644 --- a/src/Facades/JWTAuth.php +++ b/src/Facades/JWTAuth.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Facades; +namespace PHPOpenSourceSaver\JWTAuth\Facades; use Illuminate\Support\Facades\Facade; diff --git a/src/Facades/JWTFactory.php b/src/Facades/JWTFactory.php index f43ff469..1d7c14f8 100644 --- a/src/Facades/JWTFactory.php +++ b/src/Facades/JWTFactory.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Facades; +namespace PHPOpenSourceSaver\JWTAuth\Facades; use Illuminate\Support\Facades\Facade; diff --git a/src/Facades/JWTProvider.php b/src/Facades/JWTProvider.php index e3472b12..324f94dc 100644 --- a/src/Facades/JWTProvider.php +++ b/src/Facades/JWTProvider.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Facades; +namespace PHPOpenSourceSaver\JWTAuth\Facades; use Illuminate\Support\Facades\Facade; diff --git a/src/Factory.php b/src/Factory.php index e25c1979..6037f2fb 100644 --- a/src/Factory.php +++ b/src/Factory.php @@ -9,14 +9,14 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth; +namespace PHPOpenSourceSaver\JWTAuth; -use Tymon\JWTAuth\Claims\Claim; -use Tymon\JWTAuth\Claims\Collection; -use Tymon\JWTAuth\Claims\Factory as ClaimFactory; -use Tymon\JWTAuth\Support\CustomClaims; -use Tymon\JWTAuth\Support\RefreshFlow; -use Tymon\JWTAuth\Validators\PayloadValidator; +use PHPOpenSourceSaver\JWTAuth\Claims\Claim; +use PHPOpenSourceSaver\JWTAuth\Claims\Collection; +use PHPOpenSourceSaver\JWTAuth\Claims\Factory as ClaimFactory; +use PHPOpenSourceSaver\JWTAuth\Support\CustomClaims; +use PHPOpenSourceSaver\JWTAuth\Support\RefreshFlow; +use PHPOpenSourceSaver\JWTAuth\Validators\PayloadValidator; class Factory { @@ -25,14 +25,14 @@ class Factory /** * The claim factory. * - * @var \Tymon\JWTAuth\Claims\Factory + * @var \PHPOpenSourceSaver\JWTAuth\Claims\Factory */ protected $claimFactory; /** * The validator. * - * @var \Tymon\JWTAuth\Validators\PayloadValidator + * @var \PHPOpenSourceSaver\JWTAuth\Validators\PayloadValidator */ protected $validator; @@ -52,15 +52,15 @@ class Factory /** * The claims collection. * - * @var \Tymon\JWTAuth\Claims\Collection + * @var \PHPOpenSourceSaver\JWTAuth\Claims\Collection */ protected $claims; /** * Constructor. * - * @param \Tymon\JWTAuth\Claims\Factory $claimFactory - * @param \Tymon\JWTAuth\Validators\PayloadValidator $validator + * @param \PHPOpenSourceSaver\JWTAuth\Claims\Factory $claimFactory + * @param \PHPOpenSourceSaver\JWTAuth\Validators\PayloadValidator $validator * * @return void */ @@ -76,7 +76,7 @@ public function __construct(ClaimFactory $claimFactory, PayloadValidator $valida * * @param bool $resetClaims * - * @return \Tymon\JWTAuth\Payload + * @return \PHPOpenSourceSaver\JWTAuth\Payload */ public function make($resetClaims = false) { @@ -154,7 +154,7 @@ protected function buildClaims() /** * Build out the Claim DTO's. * - * @return \Tymon\JWTAuth\Claims\Collection + * @return \PHPOpenSourceSaver\JWTAuth\Claims\Collection */ protected function resolveClaims() { @@ -166,7 +166,7 @@ protected function resolveClaims() /** * Build and get the Claims Collection. * - * @return \Tymon\JWTAuth\Claims\Collection + * @return \PHPOpenSourceSaver\JWTAuth\Claims\Collection */ public function buildClaimsCollection() { @@ -176,9 +176,9 @@ public function buildClaimsCollection() /** * Get a Payload instance with a claims collection. * - * @param \Tymon\JWTAuth\Claims\Collection $claims + * @param \PHPOpenSourceSaver\JWTAuth\Claims\Collection $claims * - * @return \Tymon\JWTAuth\Payload + * @return \PHPOpenSourceSaver\JWTAuth\Payload */ public function withClaims(Collection $claims) { @@ -236,7 +236,7 @@ public function getDefaultClaims() /** * Get the PayloadValidator instance. * - * @return \Tymon\JWTAuth\Validators\PayloadValidator + * @return \PHPOpenSourceSaver\JWTAuth\Validators\PayloadValidator */ public function validator() { diff --git a/src/Http/Middleware/Authenticate.php b/src/Http/Middleware/Authenticate.php index 257839b0..0b41f371 100644 --- a/src/Http/Middleware/Authenticate.php +++ b/src/Http/Middleware/Authenticate.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Http\Middleware; +namespace PHPOpenSourceSaver\JWTAuth\Http\Middleware; use Closure; diff --git a/src/Http/Middleware/AuthenticateAndRenew.php b/src/Http/Middleware/AuthenticateAndRenew.php index 7f6ba58c..2bee2f09 100644 --- a/src/Http/Middleware/AuthenticateAndRenew.php +++ b/src/Http/Middleware/AuthenticateAndRenew.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Http\Middleware; +namespace PHPOpenSourceSaver\JWTAuth\Http\Middleware; use Closure; diff --git a/src/Http/Middleware/BaseMiddleware.php b/src/Http/Middleware/BaseMiddleware.php index c977d4e1..90d26a86 100644 --- a/src/Http/Middleware/BaseMiddleware.php +++ b/src/Http/Middleware/BaseMiddleware.php @@ -9,12 +9,12 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Http\Middleware; +namespace PHPOpenSourceSaver\JWTAuth\Http\Middleware; use Illuminate\Http\Request; use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException; -use Tymon\JWTAuth\Exceptions\JWTException; -use Tymon\JWTAuth\JWTAuth; +use PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException; +use PHPOpenSourceSaver\JWTAuth\JWTAuth; /** @deprecated */ abstract class BaseMiddleware @@ -22,14 +22,14 @@ abstract class BaseMiddleware /** * The JWT Authenticator. * - * @var \Tymon\JWTAuth\JWTAuth + * @var \PHPOpenSourceSaver\JWTAuth\JWTAuth */ protected $auth; /** * Create a new BaseMiddleware instance. * - * @param \Tymon\JWTAuth\JWTAuth $auth + * @param \PHPOpenSourceSaver\JWTAuth\JWTAuth $auth * * @return void */ diff --git a/src/Http/Middleware/Check.php b/src/Http/Middleware/Check.php index ae249c3a..a6545e2c 100644 --- a/src/Http/Middleware/Check.php +++ b/src/Http/Middleware/Check.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Http\Middleware; +namespace PHPOpenSourceSaver\JWTAuth\Http\Middleware; use Closure; use Exception; diff --git a/src/Http/Middleware/RefreshToken.php b/src/Http/Middleware/RefreshToken.php index f3eefa7a..43430e9c 100644 --- a/src/Http/Middleware/RefreshToken.php +++ b/src/Http/Middleware/RefreshToken.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Http\Middleware; +namespace PHPOpenSourceSaver\JWTAuth\Http\Middleware; use Closure; use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException; -use Tymon\JWTAuth\Exceptions\JWTException; +use PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException; /** @deprecated */ class RefreshToken extends BaseMiddleware diff --git a/src/Http/Parser/AuthHeaders.php b/src/Http/Parser/AuthHeaders.php index 40d2d5a6..309e3798 100644 --- a/src/Http/Parser/AuthHeaders.php +++ b/src/Http/Parser/AuthHeaders.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Http\Parser; +namespace PHPOpenSourceSaver\JWTAuth\Http\Parser; use Illuminate\Http\Request; -use Tymon\JWTAuth\Contracts\Http\Parser as ParserContract; +use PHPOpenSourceSaver\JWTAuth\Contracts\Http\Parser as ParserContract; class AuthHeaders implements ParserContract { diff --git a/src/Http/Parser/Cookies.php b/src/Http/Parser/Cookies.php index ad3d5e21..43851c08 100644 --- a/src/Http/Parser/Cookies.php +++ b/src/Http/Parser/Cookies.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Http\Parser; +namespace PHPOpenSourceSaver\JWTAuth\Http\Parser; use Illuminate\Http\Request; use Illuminate\Support\Facades\Crypt; -use Tymon\JWTAuth\Contracts\Http\Parser as ParserContract; +use PHPOpenSourceSaver\JWTAuth\Contracts\Http\Parser as ParserContract; class Cookies implements ParserContract { diff --git a/src/Http/Parser/InputSource.php b/src/Http/Parser/InputSource.php index d5692bf0..656b08b8 100644 --- a/src/Http/Parser/InputSource.php +++ b/src/Http/Parser/InputSource.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Http\Parser; +namespace PHPOpenSourceSaver\JWTAuth\Http\Parser; use Illuminate\Http\Request; -use Tymon\JWTAuth\Contracts\Http\Parser as ParserContract; +use PHPOpenSourceSaver\JWTAuth\Contracts\Http\Parser as ParserContract; class InputSource implements ParserContract { diff --git a/src/Http/Parser/KeyTrait.php b/src/Http/Parser/KeyTrait.php index e65da38e..e95efc8b 100644 --- a/src/Http/Parser/KeyTrait.php +++ b/src/Http/Parser/KeyTrait.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Http\Parser; +namespace PHPOpenSourceSaver\JWTAuth\Http\Parser; trait KeyTrait { diff --git a/src/Http/Parser/LumenRouteParams.php b/src/Http/Parser/LumenRouteParams.php index e9a7b7a4..6210e02c 100644 --- a/src/Http/Parser/LumenRouteParams.php +++ b/src/Http/Parser/LumenRouteParams.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Http\Parser; +namespace PHPOpenSourceSaver\JWTAuth\Http\Parser; use Illuminate\Http\Request; use Illuminate\Support\Arr; diff --git a/src/Http/Parser/Parser.php b/src/Http/Parser/Parser.php index 4c188193..5e02f3b0 100644 --- a/src/Http/Parser/Parser.php +++ b/src/Http/Parser/Parser.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Http\Parser; +namespace PHPOpenSourceSaver\JWTAuth\Http\Parser; use Illuminate\Http\Request; @@ -56,7 +56,7 @@ public function getChain() /** * Add a new parser to the chain. * - * @param array|\Tymon\JWTAuth\Contracts\Http\Parser $parsers + * @param array|\PHPOpenSourceSaver\JWTAuth\Contracts\Http\Parser $parsers * * @return $this */ diff --git a/src/Http/Parser/QueryString.php b/src/Http/Parser/QueryString.php index 68b1a359..bd045cc5 100644 --- a/src/Http/Parser/QueryString.php +++ b/src/Http/Parser/QueryString.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Http\Parser; +namespace PHPOpenSourceSaver\JWTAuth\Http\Parser; use Illuminate\Http\Request; -use Tymon\JWTAuth\Contracts\Http\Parser as ParserContract; +use PHPOpenSourceSaver\JWTAuth\Contracts\Http\Parser as ParserContract; class QueryString implements ParserContract { diff --git a/src/Http/Parser/RouteParams.php b/src/Http/Parser/RouteParams.php index b178b238..d96d4412 100644 --- a/src/Http/Parser/RouteParams.php +++ b/src/Http/Parser/RouteParams.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Http\Parser; +namespace PHPOpenSourceSaver\JWTAuth\Http\Parser; use Illuminate\Http\Request; -use Tymon\JWTAuth\Contracts\Http\Parser as ParserContract; +use PHPOpenSourceSaver\JWTAuth\Contracts\Http\Parser as ParserContract; class RouteParams implements ParserContract { diff --git a/src/JWT.php b/src/JWT.php index c881009c..d477a6c2 100644 --- a/src/JWT.php +++ b/src/JWT.php @@ -9,14 +9,14 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth; +namespace PHPOpenSourceSaver\JWTAuth; use BadMethodCallException; use Illuminate\Http\Request; -use Tymon\JWTAuth\Contracts\JWTSubject; -use Tymon\JWTAuth\Exceptions\JWTException; -use Tymon\JWTAuth\Http\Parser\Parser; -use Tymon\JWTAuth\Support\CustomClaims; +use PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject; +use PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\Parser; +use PHPOpenSourceSaver\JWTAuth\Support\CustomClaims; class JWT { @@ -25,21 +25,21 @@ class JWT /** * The authentication manager. * - * @var \Tymon\JWTAuth\Manager + * @var \PHPOpenSourceSaver\JWTAuth\Manager */ protected $manager; /** * The HTTP parser. * - * @var \Tymon\JWTAuth\Http\Parser\Parser + * @var \PHPOpenSourceSaver\JWTAuth\Http\Parser\Parser */ protected $parser; /** * The token. * - * @var \Tymon\JWTAuth\Token|null + * @var \PHPOpenSourceSaver\JWTAuth\Token|null */ protected $token; @@ -53,8 +53,8 @@ class JWT /** * JWT constructor. * - * @param \Tymon\JWTAuth\Manager $manager - * @param \Tymon\JWTAuth\Http\Parser\Parser $parser + * @param \PHPOpenSourceSaver\JWTAuth\Manager $manager + * @param \PHPOpenSourceSaver\JWTAuth\Http\Parser\Parser $parser * * @return void */ @@ -67,7 +67,7 @@ public function __construct(Manager $manager, Parser $parser) /** * Generate a token for a given subject. * - * @param \Tymon\JWTAuth\Contracts\JWTSubject $subject + * @param \PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject $subject * * @return string */ @@ -81,7 +81,7 @@ public function fromSubject(JWTSubject $subject) /** * Alias to generate a token for a given user. * - * @param \Tymon\JWTAuth\Contracts\JWTSubject $user + * @param \PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject $user * * @return string */ @@ -127,9 +127,9 @@ public function invalidate($forceForever = false) * Alias to get the payload, and as a result checks that * the token is valid i.e. not expired or blacklisted. * - * @throws \Tymon\JWTAuth\Exceptions\JWTException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException * - * @return \Tymon\JWTAuth\Payload + * @return \PHPOpenSourceSaver\JWTAuth\Payload */ public function checkOrFail() { @@ -141,7 +141,7 @@ public function checkOrFail() * * @param bool $getPayload * - * @return \Tymon\JWTAuth\Payload|bool + * @return \PHPOpenSourceSaver\JWTAuth\Payload|bool */ public function check($getPayload = false) { @@ -157,7 +157,7 @@ public function check($getPayload = false) /** * Get the token. * - * @return \Tymon\JWTAuth\Token|null + * @return \PHPOpenSourceSaver\JWTAuth\Token|null */ public function getToken() { @@ -175,7 +175,7 @@ public function getToken() /** * Parse the token from the request. * - * @throws \Tymon\JWTAuth\Exceptions\JWTException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException * * @return $this */ @@ -191,7 +191,7 @@ public function parseToken() /** * Get the raw Payload instance. * - * @return \Tymon\JWTAuth\Payload + * @return \PHPOpenSourceSaver\JWTAuth\Payload */ public function getPayload() { @@ -203,7 +203,7 @@ public function getPayload() /** * Alias for getPayload(). * - * @return \Tymon\JWTAuth\Payload + * @return \PHPOpenSourceSaver\JWTAuth\Payload */ public function payload() { @@ -225,9 +225,9 @@ public function getClaim($claim) /** * Create a Payload instance. * - * @param \Tymon\JWTAuth\Contracts\JWTSubject $subject + * @param \PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject $subject * - * @return \Tymon\JWTAuth\Payload + * @return \PHPOpenSourceSaver\JWTAuth\Payload */ public function makePayload(JWTSubject $subject) { @@ -237,7 +237,7 @@ public function makePayload(JWTSubject $subject) /** * Build the claims array and return it. * - * @param \Tymon\JWTAuth\Contracts\JWTSubject $subject + * @param \PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject $subject * * @return array */ @@ -253,7 +253,7 @@ protected function getClaimsArray(JWTSubject $subject) /** * Get the claims associated with a given subject. * - * @param \Tymon\JWTAuth\Contracts\JWTSubject $subject + * @param \PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject $subject * * @return array */ @@ -295,7 +295,7 @@ public function checkSubjectModel($model) /** * Set the token. * - * @param \Tymon\JWTAuth\Token|string $token + * @param \PHPOpenSourceSaver\JWTAuth\Token|string $token * * @return $this */ @@ -321,7 +321,7 @@ public function unsetToken() /** * Ensure that a token is available. * - * @throws \Tymon\JWTAuth\Exceptions\JWTException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException * * @return void */ @@ -363,7 +363,7 @@ public function lockSubject($lock) /** * Get the Manager instance. * - * @return \Tymon\JWTAuth\Manager + * @return \PHPOpenSourceSaver\JWTAuth\Manager */ public function manager() { @@ -373,7 +373,7 @@ public function manager() /** * Get the Parser instance. * - * @return \Tymon\JWTAuth\Http\Parser\Parser + * @return \PHPOpenSourceSaver\JWTAuth\Http\Parser\Parser */ public function parser() { @@ -383,7 +383,7 @@ public function parser() /** * Get the Payload Factory. * - * @return \Tymon\JWTAuth\Factory + * @return \PHPOpenSourceSaver\JWTAuth\Factory */ public function factory() { @@ -393,7 +393,7 @@ public function factory() /** * Get the Blacklist. * - * @return \Tymon\JWTAuth\Blacklist + * @return \PHPOpenSourceSaver\JWTAuth\Blacklist */ public function blacklist() { diff --git a/src/JWTAuth.php b/src/JWTAuth.php index 38612bea..e2cd1279 100644 --- a/src/JWTAuth.php +++ b/src/JWTAuth.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth; +namespace PHPOpenSourceSaver\JWTAuth; -use Tymon\JWTAuth\Contracts\Providers\Auth; -use Tymon\JWTAuth\Http\Parser\Parser; +use PHPOpenSourceSaver\JWTAuth\Contracts\Providers\Auth; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\Parser; /** @deprecated */ class JWTAuth extends JWT @@ -20,16 +20,16 @@ class JWTAuth extends JWT /** * The authentication provider. * - * @var \Tymon\JWTAuth\Contracts\Providers\Auth + * @var \PHPOpenSourceSaver\JWTAuth\Contracts\Providers\Auth */ protected $auth; /** * Constructor. * - * @param \Tymon\JWTAuth\Manager $manager - * @param \Tymon\JWTAuth\Contracts\Providers\Auth $auth - * @param \Tymon\JWTAuth\Http\Parser\Parser $parser + * @param \PHPOpenSourceSaver\JWTAuth\Manager $manager + * @param \PHPOpenSourceSaver\JWTAuth\Contracts\Providers\Auth $auth + * @param \PHPOpenSourceSaver\JWTAuth\Http\Parser\Parser $parser * * @return void */ @@ -58,7 +58,7 @@ public function attempt(array $credentials) /** * Authenticate a user via a token. * - * @return \Tymon\JWTAuth\Contracts\JWTSubject|false + * @return \PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject|false */ public function authenticate() { @@ -74,7 +74,7 @@ public function authenticate() /** * Alias for authenticate(). * - * @return \Tymon\JWTAuth\Contracts\JWTSubject|false + * @return \PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject|false */ public function toUser() { @@ -84,7 +84,7 @@ public function toUser() /** * Get the authenticated user. * - * @return \Tymon\JWTAuth\Contracts\JWTSubject + * @return \PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject */ public function user() { diff --git a/src/JWTGuard.php b/src/JWTGuard.php index 28f477fa..a05c214b 100644 --- a/src/JWTGuard.php +++ b/src/JWTGuard.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth; +namespace PHPOpenSourceSaver\JWTAuth; use BadMethodCallException; use Illuminate\Auth\GuardHelpers; @@ -17,9 +17,9 @@ use Illuminate\Contracts\Auth\UserProvider; use Illuminate\Http\Request; use Illuminate\Support\Traits\Macroable; -use Tymon\JWTAuth\Contracts\JWTSubject; -use Tymon\JWTAuth\Exceptions\JWTException; -use Tymon\JWTAuth\Exceptions\UserNotDefinedException; +use PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject; +use PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException; +use PHPOpenSourceSaver\JWTAuth\Exceptions\UserNotDefinedException; class JWTGuard implements Guard { @@ -37,7 +37,7 @@ class JWTGuard implements Guard /** * The JWT instance. * - * @var \Tymon\JWTAuth\JWT + * @var \PHPOpenSourceSaver\JWTAuth\JWT */ protected $jwt; @@ -51,7 +51,7 @@ class JWTGuard implements Guard /** * Instantiate the class. * - * @param \Tymon\JWTAuth\JWT $jwt + * @param \PHPOpenSourceSaver\JWTAuth\JWT $jwt * @param \Illuminate\Contracts\Auth\UserProvider $provider * @param \Illuminate\Http\Request $request * @@ -86,7 +86,7 @@ public function user() /** * Get the currently authenticated user or throws an exception. * - * @throws \Tymon\JWTAuth\Exceptions\UserNotDefinedException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\UserNotDefinedException * * @return \Illuminate\Contracts\Auth\Authenticatable */ @@ -133,7 +133,7 @@ public function attempt(array $credentials = [], $login = true) /** * Create a token for a user. * - * @param \Tymon\JWTAuth\Contracts\JWTSubject $user + * @param \PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject $user * * @return string */ @@ -178,7 +178,7 @@ public function refresh($forceForever = false, $resetClaims = false) * * @param bool $forceForever * - * @return \Tymon\JWTAuth\JWT + * @return \PHPOpenSourceSaver\JWTAuth\JWT */ public function invalidate($forceForever = false) { @@ -264,7 +264,7 @@ public function claims(array $claims) /** * Get the raw Payload instance. * - * @return \Tymon\JWTAuth\Payload + * @return \PHPOpenSourceSaver\JWTAuth\Payload */ public function getPayload() { @@ -274,7 +274,7 @@ public function getPayload() /** * Alias for getPayload(). * - * @return \Tymon\JWTAuth\Payload + * @return \PHPOpenSourceSaver\JWTAuth\Payload */ public function payload() { @@ -284,7 +284,7 @@ public function payload() /** * Set the token. * - * @param \Tymon\JWTAuth\Token|string $token + * @param \PHPOpenSourceSaver\JWTAuth\Token|string $token * * @return $this */ @@ -409,9 +409,9 @@ protected function validateSubject() /** * Ensure that a token is available in the request. * - * @throws \Tymon\JWTAuth\Exceptions\JWTException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException * - * @return \Tymon\JWTAuth\JWT + * @return \PHPOpenSourceSaver\JWTAuth\JWT */ protected function requireToken() { diff --git a/src/Manager.php b/src/Manager.php index 9ada53d0..49d0b795 100644 --- a/src/Manager.php +++ b/src/Manager.php @@ -9,13 +9,13 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth; +namespace PHPOpenSourceSaver\JWTAuth; -use Tymon\JWTAuth\Contracts\Providers\JWT as JWTContract; -use Tymon\JWTAuth\Exceptions\JWTException; -use Tymon\JWTAuth\Exceptions\TokenBlacklistedException; -use Tymon\JWTAuth\Support\CustomClaims; -use Tymon\JWTAuth\Support\RefreshFlow; +use PHPOpenSourceSaver\JWTAuth\Contracts\Providers\JWT as JWTContract; +use PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenBlacklistedException; +use PHPOpenSourceSaver\JWTAuth\Support\CustomClaims; +use PHPOpenSourceSaver\JWTAuth\Support\RefreshFlow; class Manager { @@ -24,21 +24,21 @@ class Manager /** * The provider. * - * @var \Tymon\JWTAuth\Contracts\Providers\JWT + * @var \PHPOpenSourceSaver\JWTAuth\Contracts\Providers\JWT */ protected $provider; /** * The blacklist. * - * @var \Tymon\JWTAuth\Blacklist + * @var \PHPOpenSourceSaver\JWTAuth\Blacklist */ protected $blacklist; /** * the payload factory. * - * @var \Tymon\JWTAuth\Factory + * @var \PHPOpenSourceSaver\JWTAuth\Factory */ protected $payloadFactory; @@ -59,9 +59,9 @@ class Manager /** * Constructor. * - * @param \Tymon\JWTAuth\Contracts\Providers\JWT $provider - * @param \Tymon\JWTAuth\Blacklist $blacklist - * @param \Tymon\JWTAuth\Factory $payloadFactory + * @param \PHPOpenSourceSaver\JWTAuth\Contracts\Providers\JWT $provider + * @param \PHPOpenSourceSaver\JWTAuth\Blacklist $blacklist + * @param \PHPOpenSourceSaver\JWTAuth\Factory $payloadFactory * * @return void */ @@ -75,9 +75,9 @@ public function __construct(JWTContract $provider, Blacklist $blacklist, Factory /** * Encode a Payload and return the Token. * - * @param \Tymon\JWTAuth\Payload $payload + * @param \PHPOpenSourceSaver\JWTAuth\Payload $payload * - * @return \Tymon\JWTAuth\Token + * @return \PHPOpenSourceSaver\JWTAuth\Token */ public function encode(Payload $payload) { @@ -89,12 +89,12 @@ public function encode(Payload $payload) /** * Decode a Token and return the Payload. * - * @param \Tymon\JWTAuth\Token $token + * @param \PHPOpenSourceSaver\JWTAuth\Token $token * @param bool $checkBlacklist * - * @throws \Tymon\JWTAuth\Exceptions\TokenBlacklistedException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\TokenBlacklistedException * - * @return \Tymon\JWTAuth\Payload + * @return \PHPOpenSourceSaver\JWTAuth\Payload */ public function decode(Token $token, $checkBlacklist = true) { @@ -115,11 +115,11 @@ public function decode(Token $token, $checkBlacklist = true) /** * Refresh a Token and return a new Token. * - * @param \Tymon\JWTAuth\Token $token + * @param \PHPOpenSourceSaver\JWTAuth\Token $token * @param bool $forceForever * @param bool $resetClaims * - * @return \Tymon\JWTAuth\Token + * @return \PHPOpenSourceSaver\JWTAuth\Token */ public function refresh(Token $token, $forceForever = false, $resetClaims = false) { @@ -141,10 +141,10 @@ public function refresh(Token $token, $forceForever = false, $resetClaims = fals /** * Invalidate a Token by adding it to the blacklist. * - * @param \Tymon\JWTAuth\Token $token + * @param \PHPOpenSourceSaver\JWTAuth\Token $token * @param bool $forceForever * - * @throws \Tymon\JWTAuth\Exceptions\JWTException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException * * @return bool */ @@ -163,7 +163,7 @@ public function invalidate(Token $token, $forceForever = false) /** * Build the claims to go into the refreshed token. * - * @param \Tymon\JWTAuth\Payload $payload + * @param \PHPOpenSourceSaver\JWTAuth\Payload $payload * * @return array */ @@ -188,7 +188,7 @@ protected function buildRefreshClaims(Payload $payload) /** * Get the Payload Factory instance. * - * @return \Tymon\JWTAuth\Factory + * @return \PHPOpenSourceSaver\JWTAuth\Factory */ public function getPayloadFactory() { @@ -198,7 +198,7 @@ public function getPayloadFactory() /** * Get the JWTProvider instance. * - * @return \Tymon\JWTAuth\Contracts\Providers\JWT + * @return \PHPOpenSourceSaver\JWTAuth\Contracts\Providers\JWT */ public function getJWTProvider() { @@ -208,7 +208,7 @@ public function getJWTProvider() /** * Get the Blacklist instance. * - * @return \Tymon\JWTAuth\Blacklist + * @return \PHPOpenSourceSaver\JWTAuth\Blacklist */ public function getBlacklist() { diff --git a/src/Payload.php b/src/Payload.php index b7b49974..9f292a03 100644 --- a/src/Payload.php +++ b/src/Payload.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth; +namespace PHPOpenSourceSaver\JWTAuth; use ArrayAccess; use BadMethodCallException; @@ -19,25 +19,25 @@ use Illuminate\Support\Arr; use Illuminate\Support\Str; use JsonSerializable; -use Tymon\JWTAuth\Claims\Claim; -use Tymon\JWTAuth\Claims\Collection; -use Tymon\JWTAuth\Exceptions\PayloadException; -use Tymon\JWTAuth\Validators\PayloadValidator; +use PHPOpenSourceSaver\JWTAuth\Claims\Claim; +use PHPOpenSourceSaver\JWTAuth\Claims\Collection; +use PHPOpenSourceSaver\JWTAuth\Exceptions\PayloadException; +use PHPOpenSourceSaver\JWTAuth\Validators\PayloadValidator; class Payload implements ArrayAccess, Arrayable, Countable, Jsonable, JsonSerializable { /** * The collection of claims. * - * @var \Tymon\JWTAuth\Claims\Collection + * @var \PHPOpenSourceSaver\JWTAuth\Claims\Collection */ private $claims; /** * Build the Payload. * - * @param \Tymon\JWTAuth\Claims\Collection $claims - * @param \Tymon\JWTAuth\Validators\PayloadValidator $validator + * @param \PHPOpenSourceSaver\JWTAuth\Claims\Collection $claims + * @param \PHPOpenSourceSaver\JWTAuth\Validators\PayloadValidator $validator * @param bool $refreshFlow * * @return void @@ -50,7 +50,7 @@ public function __construct(Collection $claims, PayloadValidator $validator, $re /** * Get the array of claim instances. * - * @return \Tymon\JWTAuth\Claims\Collection + * @return \PHPOpenSourceSaver\JWTAuth\Claims\Collection */ public function getClaims() { @@ -121,7 +121,7 @@ public function get($claim = null) * * @param string $claim * - * @return \Tymon\JWTAuth\Claims\Claim + * @return \PHPOpenSourceSaver\JWTAuth\Claims\Claim */ public function getInternal($claim) { @@ -131,7 +131,7 @@ public function getInternal($claim) /** * Determine whether the payload has the claim (by instance). * - * @param \Tymon\JWTAuth\Claims\Claim $claim + * @param \PHPOpenSourceSaver\JWTAuth\Claims\Claim $claim * * @return bool */ @@ -224,7 +224,7 @@ public function offsetGet($key) * @param mixed $key * @param mixed $value * - * @throws \Tymon\JWTAuth\Exceptions\PayloadException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\PayloadException */ public function offsetSet($key, $value) { @@ -236,7 +236,7 @@ public function offsetSet($key, $value) * * @param string $key * - * @throws \Tymon\JWTAuth\Exceptions\PayloadException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\PayloadException * * @return void */ @@ -281,7 +281,7 @@ public function __call($method, $parameters) { if (preg_match('/get(.+)\b/i', $method, $matches)) { foreach ($this->claims as $claim) { - if (get_class($claim) === 'Tymon\\JWTAuth\\Claims\\'.$matches[1]) { + if (get_class($claim) === 'PHPOpenSourceSaver\\JWTAuth\\Claims\\'.$matches[1]) { return $claim->getValue(); } } diff --git a/src/Providers/AbstractServiceProvider.php b/src/Providers/AbstractServiceProvider.php index ca312a40..6f753a5a 100644 --- a/src/Providers/AbstractServiceProvider.php +++ b/src/Providers/AbstractServiceProvider.php @@ -9,34 +9,34 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Providers; +namespace PHPOpenSourceSaver\JWTAuth\Providers; use Illuminate\Support\ServiceProvider; use Lcobucci\JWT\Builder as JWTBuilder; use Lcobucci\JWT\Parser as JWTParser; use Namshi\JOSE\JWS; -use Tymon\JWTAuth\Blacklist; -use Tymon\JWTAuth\Claims\Factory as ClaimFactory; -use Tymon\JWTAuth\Console\JWTGenerateSecretCommand; -use Tymon\JWTAuth\Contracts\Providers\Auth; -use Tymon\JWTAuth\Contracts\Providers\JWT as JWTContract; -use Tymon\JWTAuth\Contracts\Providers\Storage; -use Tymon\JWTAuth\Factory; -use Tymon\JWTAuth\Http\Middleware\Authenticate; -use Tymon\JWTAuth\Http\Middleware\AuthenticateAndRenew; -use Tymon\JWTAuth\Http\Middleware\Check; -use Tymon\JWTAuth\Http\Middleware\RefreshToken; -use Tymon\JWTAuth\Http\Parser\AuthHeaders; -use Tymon\JWTAuth\Http\Parser\InputSource; -use Tymon\JWTAuth\Http\Parser\Parser; -use Tymon\JWTAuth\Http\Parser\QueryString; -use Tymon\JWTAuth\JWT; -use Tymon\JWTAuth\JWTAuth; -use Tymon\JWTAuth\JWTGuard; -use Tymon\JWTAuth\Manager; -use Tymon\JWTAuth\Providers\JWT\Lcobucci; -use Tymon\JWTAuth\Providers\JWT\Namshi; -use Tymon\JWTAuth\Validators\PayloadValidator; +use PHPOpenSourceSaver\JWTAuth\Blacklist; +use PHPOpenSourceSaver\JWTAuth\Claims\Factory as ClaimFactory; +use PHPOpenSourceSaver\JWTAuth\Console\JWTGenerateSecretCommand; +use PHPOpenSourceSaver\JWTAuth\Contracts\Providers\Auth; +use PHPOpenSourceSaver\JWTAuth\Contracts\Providers\JWT as JWTContract; +use PHPOpenSourceSaver\JWTAuth\Contracts\Providers\Storage; +use PHPOpenSourceSaver\JWTAuth\Factory; +use PHPOpenSourceSaver\JWTAuth\Http\Middleware\Authenticate; +use PHPOpenSourceSaver\JWTAuth\Http\Middleware\AuthenticateAndRenew; +use PHPOpenSourceSaver\JWTAuth\Http\Middleware\Check; +use PHPOpenSourceSaver\JWTAuth\Http\Middleware\RefreshToken; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\AuthHeaders; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\InputSource; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\Parser; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\QueryString; +use PHPOpenSourceSaver\JWTAuth\JWT; +use PHPOpenSourceSaver\JWTAuth\JWTAuth; +use PHPOpenSourceSaver\JWTAuth\JWTGuard; +use PHPOpenSourceSaver\JWTAuth\Manager; +use PHPOpenSourceSaver\JWTAuth\Providers\JWT\Lcobucci; +use PHPOpenSourceSaver\JWTAuth\Providers\JWT\Namshi; +use PHPOpenSourceSaver\JWTAuth\Validators\PayloadValidator; abstract class AbstractServiceProvider extends ServiceProvider { diff --git a/src/Providers/Auth/Illuminate.php b/src/Providers/Auth/Illuminate.php index 486c3650..1c5ceac7 100644 --- a/src/Providers/Auth/Illuminate.php +++ b/src/Providers/Auth/Illuminate.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Providers\Auth; +namespace PHPOpenSourceSaver\JWTAuth\Providers\Auth; use Illuminate\Contracts\Auth\Guard as GuardContract; -use Tymon\JWTAuth\Contracts\Providers\Auth; +use PHPOpenSourceSaver\JWTAuth\Contracts\Providers\Auth; class Illuminate implements Auth { diff --git a/src/Providers/JWT/Lcobucci.php b/src/Providers/JWT/Lcobucci.php index 126bdda3..1a598f9c 100644 --- a/src/Providers/JWT/Lcobucci.php +++ b/src/Providers/JWT/Lcobucci.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Providers\JWT; +namespace PHPOpenSourceSaver\JWTAuth\Providers\JWT; use Exception; use Illuminate\Support\Collection; @@ -28,9 +28,9 @@ use Lcobucci\JWT\Signer\Rsa\Sha384 as RS384; use Lcobucci\JWT\Signer\Rsa\Sha512 as RS512; use ReflectionClass; -use Tymon\JWTAuth\Contracts\Providers\JWT; -use Tymon\JWTAuth\Exceptions\JWTException; -use Tymon\JWTAuth\Exceptions\TokenInvalidException; +use PHPOpenSourceSaver\JWTAuth\Contracts\Providers\JWT; +use PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenInvalidException; class Lcobucci extends Provider implements JWT { @@ -95,7 +95,7 @@ public function __construct( * * @param array $payload * - * @throws \Tymon\JWTAuth\Exceptions\JWTException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException * * @return string */ @@ -121,7 +121,7 @@ public function encode(array $payload) * * @param string $token * - * @throws \Tymon\JWTAuth\Exceptions\JWTException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException * * @return array */ @@ -145,7 +145,7 @@ public function decode($token) /** * Get the signer instance. * - * @throws \Tymon\JWTAuth\Exceptions\JWTException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException * * @return \Lcobucci\JWT\Signer */ diff --git a/src/Providers/JWT/Namshi.php b/src/Providers/JWT/Namshi.php index 79e78f65..fd6d635f 100644 --- a/src/Providers/JWT/Namshi.php +++ b/src/Providers/JWT/Namshi.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Providers\JWT; +namespace PHPOpenSourceSaver\JWTAuth\Providers\JWT; use Exception; use InvalidArgumentException; @@ -17,9 +17,9 @@ use Namshi\JOSE\Signer\OpenSSL\PublicKey; use ReflectionClass; use ReflectionException; -use Tymon\JWTAuth\Contracts\Providers\JWT; -use Tymon\JWTAuth\Exceptions\JWTException; -use Tymon\JWTAuth\Exceptions\TokenInvalidException; +use PHPOpenSourceSaver\JWTAuth\Contracts\Providers\JWT; +use PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenInvalidException; class Namshi extends Provider implements JWT { @@ -52,7 +52,7 @@ public function __construct(JWS $jws, $secret, $algo, array $keys) * * @param array $payload * - * @throws \Tymon\JWTAuth\Exceptions\JWTException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException * * @return string */ @@ -72,7 +72,7 @@ public function encode(array $payload) * * @param string $token * - * @throws \Tymon\JWTAuth\Exceptions\JWTException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException * * @return array */ diff --git a/src/Providers/JWT/Provider.php b/src/Providers/JWT/Provider.php index 2b08f71f..c176e54a 100644 --- a/src/Providers/JWT/Provider.php +++ b/src/Providers/JWT/Provider.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Providers\JWT; +namespace PHPOpenSourceSaver\JWTAuth\Providers\JWT; use Illuminate\Support\Arr; @@ -182,7 +182,7 @@ protected function getVerificationKey() * Determine if the algorithm is asymmetric, and thus * requires a public/private key combo. * - * @throws \Tymon\JWTAuth\Exceptions\JWTException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException * * @return bool */ diff --git a/src/Providers/LaravelServiceProvider.php b/src/Providers/LaravelServiceProvider.php index 46e406c6..660edfc8 100644 --- a/src/Providers/LaravelServiceProvider.php +++ b/src/Providers/LaravelServiceProvider.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Providers; +namespace PHPOpenSourceSaver\JWTAuth\Providers; -use Tymon\JWTAuth\Http\Parser\Cookies; -use Tymon\JWTAuth\Http\Parser\RouteParams; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\Cookies; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\RouteParams; class LaravelServiceProvider extends AbstractServiceProvider { diff --git a/src/Providers/LumenServiceProvider.php b/src/Providers/LumenServiceProvider.php index eb30c665..660776e9 100644 --- a/src/Providers/LumenServiceProvider.php +++ b/src/Providers/LumenServiceProvider.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Providers; +namespace PHPOpenSourceSaver\JWTAuth\Providers; -use Tymon\JWTAuth\Http\Parser\LumenRouteParams; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\LumenRouteParams; class LumenServiceProvider extends AbstractServiceProvider { diff --git a/src/Providers/Storage/Illuminate.php b/src/Providers/Storage/Illuminate.php index 70f9159c..7d5e58c6 100644 --- a/src/Providers/Storage/Illuminate.php +++ b/src/Providers/Storage/Illuminate.php @@ -9,12 +9,12 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Providers\Storage; +namespace PHPOpenSourceSaver\JWTAuth\Providers\Storage; use BadMethodCallException; use Illuminate\Contracts\Cache\Repository as CacheContract; use Psr\SimpleCache\CacheInterface as PsrCacheInterface; -use Tymon\JWTAuth\Contracts\Providers\Storage; +use PHPOpenSourceSaver\JWTAuth\Contracts\Providers\Storage; class Illuminate implements Storage { diff --git a/src/Support/CustomClaims.php b/src/Support/CustomClaims.php index d5443eb9..67c4636b 100644 --- a/src/Support/CustomClaims.php +++ b/src/Support/CustomClaims.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Support; +namespace PHPOpenSourceSaver\JWTAuth\Support; trait CustomClaims { diff --git a/src/Support/RefreshFlow.php b/src/Support/RefreshFlow.php index 988b6eae..2ec3ac8a 100644 --- a/src/Support/RefreshFlow.php +++ b/src/Support/RefreshFlow.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Support; +namespace PHPOpenSourceSaver\JWTAuth\Support; trait RefreshFlow { diff --git a/src/Support/Utils.php b/src/Support/Utils.php index 5738e6ed..3eb50a5c 100644 --- a/src/Support/Utils.php +++ b/src/Support/Utils.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Support; +namespace PHPOpenSourceSaver\JWTAuth\Support; use Carbon\Carbon; diff --git a/src/Token.php b/src/Token.php index a51a7362..c85ed7b3 100644 --- a/src/Token.php +++ b/src/Token.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth; +namespace PHPOpenSourceSaver\JWTAuth; -use Tymon\JWTAuth\Validators\TokenValidator; +use PHPOpenSourceSaver\JWTAuth\Validators\TokenValidator; class Token { diff --git a/src/Validators/PayloadValidator.php b/src/Validators/PayloadValidator.php index d8e6de22..342083e4 100644 --- a/src/Validators/PayloadValidator.php +++ b/src/Validators/PayloadValidator.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Validators; +namespace PHPOpenSourceSaver\JWTAuth\Validators; -use Tymon\JWTAuth\Claims\Collection; -use Tymon\JWTAuth\Exceptions\TokenInvalidException; +use PHPOpenSourceSaver\JWTAuth\Claims\Collection; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenInvalidException; class PayloadValidator extends Validator { @@ -40,9 +40,9 @@ class PayloadValidator extends Validator /** * Run the validations on the payload array. * - * @param \Tymon\JWTAuth\Claims\Collection $value + * @param \PHPOpenSourceSaver\JWTAuth\Claims\Collection $value * - * @return \Tymon\JWTAuth\Claims\Collection + * @return \PHPOpenSourceSaver\JWTAuth\Claims\Collection */ public function check($value) { @@ -55,9 +55,9 @@ public function check($value) * Ensure the payload contains the required claims and * the claims have the relevant type. * - * @param \Tymon\JWTAuth\Claims\Collection $claims + * @param \PHPOpenSourceSaver\JWTAuth\Claims\Collection $claims * - * @throws \Tymon\JWTAuth\Exceptions\TokenInvalidException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\TokenInvalidException * * @return void */ @@ -71,12 +71,12 @@ protected function validateStructure(Collection $claims) /** * Validate the payload timestamps. * - * @param \Tymon\JWTAuth\Claims\Collection $claims + * @param \PHPOpenSourceSaver\JWTAuth\Claims\Collection $claims * - * @throws \Tymon\JWTAuth\Exceptions\TokenExpiredException - * @throws \Tymon\JWTAuth\Exceptions\TokenInvalidException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\TokenExpiredException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\TokenInvalidException * - * @return \Tymon\JWTAuth\Claims\Collection + * @return \PHPOpenSourceSaver\JWTAuth\Claims\Collection */ protected function validatePayload(Collection $claims) { @@ -86,11 +86,11 @@ protected function validatePayload(Collection $claims) /** * Check the token in the refresh flow context. * - * @param \Tymon\JWTAuth\Claims\Collection $claims + * @param \PHPOpenSourceSaver\JWTAuth\Claims\Collection $claims * - * @throws \Tymon\JWTAuth\Exceptions\TokenExpiredException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\TokenExpiredException * - * @return \Tymon\JWTAuth\Claims\Collection + * @return \PHPOpenSourceSaver\JWTAuth\Claims\Collection */ protected function validateRefresh(Collection $claims) { diff --git a/src/Validators/TokenValidator.php b/src/Validators/TokenValidator.php index b76f13e9..08275b2c 100644 --- a/src/Validators/TokenValidator.php +++ b/src/Validators/TokenValidator.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Validators; +namespace PHPOpenSourceSaver\JWTAuth\Validators; -use Tymon\JWTAuth\Exceptions\TokenInvalidException; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenInvalidException; class TokenValidator extends Validator { @@ -30,7 +30,7 @@ public function check($value) /** * @param string $token * - * @throws \Tymon\JWTAuth\Exceptions\TokenInvalidException + * @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\TokenInvalidException * * @return string */ diff --git a/src/Validators/Validator.php b/src/Validators/Validator.php index 6f05a462..62568843 100644 --- a/src/Validators/Validator.php +++ b/src/Validators/Validator.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Validators; +namespace PHPOpenSourceSaver\JWTAuth\Validators; -use Tymon\JWTAuth\Contracts\Validator as ValidatorContract; -use Tymon\JWTAuth\Exceptions\JWTException; -use Tymon\JWTAuth\Support\RefreshFlow; +use PHPOpenSourceSaver\JWTAuth\Contracts\Validator as ValidatorContract; +use PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException; +use PHPOpenSourceSaver\JWTAuth\Support\RefreshFlow; abstract class Validator implements ValidatorContract { diff --git a/tests/AbstractTestCase.php b/tests/AbstractTestCase.php index 45011233..76eab1e1 100644 --- a/tests/AbstractTestCase.php +++ b/tests/AbstractTestCase.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test; +namespace PHPOpenSourceSaver\JWTAuth\Test; use Carbon\Carbon; use Mockery; diff --git a/tests/BlacklistTest.php b/tests/BlacklistTest.php index 7412e82d..f7a41190 100644 --- a/tests/BlacklistTest.php +++ b/tests/BlacklistTest.php @@ -9,35 +9,35 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test; +namespace PHPOpenSourceSaver\JWTAuth\Test; use Mockery; -use Tymon\JWTAuth\Blacklist; -use Tymon\JWTAuth\Claims\Collection; -use Tymon\JWTAuth\Claims\Expiration; -use Tymon\JWTAuth\Claims\IssuedAt; -use Tymon\JWTAuth\Claims\Issuer; -use Tymon\JWTAuth\Claims\JwtId; -use Tymon\JWTAuth\Claims\NotBefore; -use Tymon\JWTAuth\Claims\Subject; -use Tymon\JWTAuth\Contracts\Providers\Storage; -use Tymon\JWTAuth\Payload; -use Tymon\JWTAuth\Validators\PayloadValidator; +use PHPOpenSourceSaver\JWTAuth\Blacklist; +use PHPOpenSourceSaver\JWTAuth\Claims\Collection; +use PHPOpenSourceSaver\JWTAuth\Claims\Expiration; +use PHPOpenSourceSaver\JWTAuth\Claims\IssuedAt; +use PHPOpenSourceSaver\JWTAuth\Claims\Issuer; +use PHPOpenSourceSaver\JWTAuth\Claims\JwtId; +use PHPOpenSourceSaver\JWTAuth\Claims\NotBefore; +use PHPOpenSourceSaver\JWTAuth\Claims\Subject; +use PHPOpenSourceSaver\JWTAuth\Contracts\Providers\Storage; +use PHPOpenSourceSaver\JWTAuth\Payload; +use PHPOpenSourceSaver\JWTAuth\Validators\PayloadValidator; class BlacklistTest extends AbstractTestCase { /** - * @var \Tymon\JWTAuth\Contracts\Providers\Storage|\Mockery\MockInterface + * @var \PHPOpenSourceSaver\JWTAuth\Contracts\Providers\Storage|\Mockery\MockInterface */ protected $storage; /** - * @var \Tymon\JWTAuth\Blacklist + * @var \PHPOpenSourceSaver\JWTAuth\Blacklist */ protected $blacklist; /** - * @var \Mockery\MockInterface|\Tymon\JWTAuth\Validators\Validator + * @var \Mockery\MockInterface|\PHPOpenSourceSaver\JWTAuth\Validators\Validator */ protected $validator; diff --git a/tests/Claims/ClaimTest.php b/tests/Claims/ClaimTest.php index eed44cca..1ce2ea7d 100644 --- a/tests/Claims/ClaimTest.php +++ b/tests/Claims/ClaimTest.php @@ -9,17 +9,17 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Claims; +namespace PHPOpenSourceSaver\JWTAuth\Test\Claims; use Illuminate\Contracts\Support\Arrayable; -use Tymon\JWTAuth\Claims\Expiration; -use Tymon\JWTAuth\Exceptions\InvalidClaimException; -use Tymon\JWTAuth\Test\AbstractTestCase; +use PHPOpenSourceSaver\JWTAuth\Claims\Expiration; +use PHPOpenSourceSaver\JWTAuth\Exceptions\InvalidClaimException; +use PHPOpenSourceSaver\JWTAuth\Test\AbstractTestCase; class ClaimTest extends AbstractTestCase { /** - * @var \Tymon\JWTAuth\Claims\Expiration + * @var \PHPOpenSourceSaver\JWTAuth\Claims\Expiration */ protected $claim; diff --git a/tests/Claims/CollectionTest.php b/tests/Claims/CollectionTest.php index 7bc2eea6..da02a384 100644 --- a/tests/Claims/CollectionTest.php +++ b/tests/Claims/CollectionTest.php @@ -9,16 +9,16 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Claims; +namespace PHPOpenSourceSaver\JWTAuth\Test\Claims; -use Tymon\JWTAuth\Claims\Collection; -use Tymon\JWTAuth\Claims\Expiration; -use Tymon\JWTAuth\Claims\IssuedAt; -use Tymon\JWTAuth\Claims\Issuer; -use Tymon\JWTAuth\Claims\JwtId; -use Tymon\JWTAuth\Claims\NotBefore; -use Tymon\JWTAuth\Claims\Subject; -use Tymon\JWTAuth\Test\AbstractTestCase; +use PHPOpenSourceSaver\JWTAuth\Claims\Collection; +use PHPOpenSourceSaver\JWTAuth\Claims\Expiration; +use PHPOpenSourceSaver\JWTAuth\Claims\IssuedAt; +use PHPOpenSourceSaver\JWTAuth\Claims\Issuer; +use PHPOpenSourceSaver\JWTAuth\Claims\JwtId; +use PHPOpenSourceSaver\JWTAuth\Claims\NotBefore; +use PHPOpenSourceSaver\JWTAuth\Claims\Subject; +use PHPOpenSourceSaver\JWTAuth\Test\AbstractTestCase; class CollectionTest extends AbstractTestCase { diff --git a/tests/Claims/DatetimeClaimTest.php b/tests/Claims/DatetimeClaimTest.php index f8c1d0b9..16744e9a 100644 --- a/tests/Claims/DatetimeClaimTest.php +++ b/tests/Claims/DatetimeClaimTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Claims; +namespace PHPOpenSourceSaver\JWTAuth\Test\Claims; use Carbon\Carbon; use DateInterval; @@ -17,21 +17,21 @@ use DateTimeImmutable; use DateTimeInterface; use Mockery; -use Tymon\JWTAuth\Claims\Collection; -use Tymon\JWTAuth\Claims\Expiration; -use Tymon\JWTAuth\Claims\IssuedAt; -use Tymon\JWTAuth\Claims\Issuer; -use Tymon\JWTAuth\Claims\JwtId; -use Tymon\JWTAuth\Claims\NotBefore; -use Tymon\JWTAuth\Claims\Subject; -use Tymon\JWTAuth\Payload; -use Tymon\JWTAuth\Test\AbstractTestCase; -use Tymon\JWTAuth\Validators\PayloadValidator; +use PHPOpenSourceSaver\JWTAuth\Claims\Collection; +use PHPOpenSourceSaver\JWTAuth\Claims\Expiration; +use PHPOpenSourceSaver\JWTAuth\Claims\IssuedAt; +use PHPOpenSourceSaver\JWTAuth\Claims\Issuer; +use PHPOpenSourceSaver\JWTAuth\Claims\JwtId; +use PHPOpenSourceSaver\JWTAuth\Claims\NotBefore; +use PHPOpenSourceSaver\JWTAuth\Claims\Subject; +use PHPOpenSourceSaver\JWTAuth\Payload; +use PHPOpenSourceSaver\JWTAuth\Test\AbstractTestCase; +use PHPOpenSourceSaver\JWTAuth\Validators\PayloadValidator; class DatetimeClaimTest extends AbstractTestCase { /** - * @var \Mockery\MockInterface|\Tymon\JWTAuth\Validators\PayloadValidator + * @var \Mockery\MockInterface|\PHPOpenSourceSaver\JWTAuth\Validators\PayloadValidator */ protected $validator; diff --git a/tests/Claims/FactoryTest.php b/tests/Claims/FactoryTest.php index 057e1f61..5d5f0015 100644 --- a/tests/Claims/FactoryTest.php +++ b/tests/Claims/FactoryTest.php @@ -9,24 +9,24 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Claims; +namespace PHPOpenSourceSaver\JWTAuth\Test\Claims; use Illuminate\Http\Request; -use Tymon\JWTAuth\Claims\Custom; -use Tymon\JWTAuth\Claims\Expiration; -use Tymon\JWTAuth\Claims\Factory; -use Tymon\JWTAuth\Claims\IssuedAt; -use Tymon\JWTAuth\Claims\Issuer; -use Tymon\JWTAuth\Claims\JwtId; -use Tymon\JWTAuth\Claims\NotBefore; -use Tymon\JWTAuth\Claims\Subject; -use Tymon\JWTAuth\Test\AbstractTestCase; -use Tymon\JWTAuth\Test\Fixtures\Foo; +use PHPOpenSourceSaver\JWTAuth\Claims\Custom; +use PHPOpenSourceSaver\JWTAuth\Claims\Expiration; +use PHPOpenSourceSaver\JWTAuth\Claims\Factory; +use PHPOpenSourceSaver\JWTAuth\Claims\IssuedAt; +use PHPOpenSourceSaver\JWTAuth\Claims\Issuer; +use PHPOpenSourceSaver\JWTAuth\Claims\JwtId; +use PHPOpenSourceSaver\JWTAuth\Claims\NotBefore; +use PHPOpenSourceSaver\JWTAuth\Claims\Subject; +use PHPOpenSourceSaver\JWTAuth\Test\AbstractTestCase; +use PHPOpenSourceSaver\JWTAuth\Test\Fixtures\Foo; class FactoryTest extends AbstractTestCase { /** - * @var \Tymon\JWTAuth\Claims\Factory + * @var \PHPOpenSourceSaver\JWTAuth\Claims\Factory */ protected $factory; diff --git a/tests/Claims/IssuedAtTest.php b/tests/Claims/IssuedAtTest.php index f57874ae..efadfbaa 100644 --- a/tests/Claims/IssuedAtTest.php +++ b/tests/Claims/IssuedAtTest.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Claims; +namespace PHPOpenSourceSaver\JWTAuth\Test\Claims; -use Tymon\JWTAuth\Claims\IssuedAt; -use Tymon\JWTAuth\Exceptions\InvalidClaimException; -use Tymon\JWTAuth\Test\AbstractTestCase; +use PHPOpenSourceSaver\JWTAuth\Claims\IssuedAt; +use PHPOpenSourceSaver\JWTAuth\Exceptions\InvalidClaimException; +use PHPOpenSourceSaver\JWTAuth\Test\AbstractTestCase; class IssuedAtTest extends AbstractTestCase { diff --git a/tests/Claims/NotBeforeTest.php b/tests/Claims/NotBeforeTest.php index 185c108a..dd6afc23 100644 --- a/tests/Claims/NotBeforeTest.php +++ b/tests/Claims/NotBeforeTest.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Claims; +namespace PHPOpenSourceSaver\JWTAuth\Test\Claims; -use Tymon\JWTAuth\Claims\NotBefore; -use Tymon\JWTAuth\Exceptions\InvalidClaimException; -use Tymon\JWTAuth\Test\AbstractTestCase; +use PHPOpenSourceSaver\JWTAuth\Claims\NotBefore; +use PHPOpenSourceSaver\JWTAuth\Exceptions\InvalidClaimException; +use PHPOpenSourceSaver\JWTAuth\Test\AbstractTestCase; class NotBeforeTest extends AbstractTestCase { diff --git a/tests/FactoryTest.php b/tests/FactoryTest.php index 773cbbe3..fa920423 100644 --- a/tests/FactoryTest.php +++ b/tests/FactoryTest.php @@ -9,36 +9,36 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test; +namespace PHPOpenSourceSaver\JWTAuth\Test; use Mockery; -use Tymon\JWTAuth\Claims\Collection; -use Tymon\JWTAuth\Claims\Custom; -use Tymon\JWTAuth\Claims\Expiration; -use Tymon\JWTAuth\Claims\Factory as ClaimFactory; -use Tymon\JWTAuth\Claims\IssuedAt; -use Tymon\JWTAuth\Claims\Issuer; -use Tymon\JWTAuth\Claims\JwtId; -use Tymon\JWTAuth\Claims\NotBefore; -use Tymon\JWTAuth\Claims\Subject; -use Tymon\JWTAuth\Factory; -use Tymon\JWTAuth\Payload; -use Tymon\JWTAuth\Validators\PayloadValidator; +use PHPOpenSourceSaver\JWTAuth\Claims\Collection; +use PHPOpenSourceSaver\JWTAuth\Claims\Custom; +use PHPOpenSourceSaver\JWTAuth\Claims\Expiration; +use PHPOpenSourceSaver\JWTAuth\Claims\Factory as ClaimFactory; +use PHPOpenSourceSaver\JWTAuth\Claims\IssuedAt; +use PHPOpenSourceSaver\JWTAuth\Claims\Issuer; +use PHPOpenSourceSaver\JWTAuth\Claims\JwtId; +use PHPOpenSourceSaver\JWTAuth\Claims\NotBefore; +use PHPOpenSourceSaver\JWTAuth\Claims\Subject; +use PHPOpenSourceSaver\JWTAuth\Factory; +use PHPOpenSourceSaver\JWTAuth\Payload; +use PHPOpenSourceSaver\JWTAuth\Validators\PayloadValidator; class FactoryTest extends AbstractTestCase { /** - * @var \Mockery\MockInterface|\Tymon\JWTAuth\Claims\Factory + * @var \Mockery\MockInterface|\PHPOpenSourceSaver\JWTAuth\Claims\Factory */ protected $claimFactory; /** - * @var \Mockery\MockInterface|\Tymon\JWTAuth\Validators\PayloadValidator + * @var \Mockery\MockInterface|\PHPOpenSourceSaver\JWTAuth\Validators\PayloadValidator */ protected $validator; /** - * @var \Tymon\JWTAuth\Factory + * @var \PHPOpenSourceSaver\JWTAuth\Factory */ protected $factory; diff --git a/tests/Fixtures/Foo.php b/tests/Fixtures/Foo.php index e47d6358..1902d6bc 100644 --- a/tests/Fixtures/Foo.php +++ b/tests/Fixtures/Foo.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Fixtures; +namespace PHPOpenSourceSaver\JWTAuth\Test\Fixtures; -use Tymon\JWTAuth\Claims\Claim; +use PHPOpenSourceSaver\JWTAuth\Claims\Claim; class Foo extends Claim { diff --git a/tests/Http/ParserTest.php b/tests/Http/ParserTest.php index feea3ccb..fb123277 100644 --- a/tests/Http/ParserTest.php +++ b/tests/Http/ParserTest.php @@ -9,21 +9,21 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Http; +namespace PHPOpenSourceSaver\JWTAuth\Test\Http; use Illuminate\Http\Request; use Illuminate\Routing\Route; use Illuminate\Support\Facades\Crypt; use Mockery; -use Tymon\JWTAuth\Contracts\Http\Parser as ParserContract; -use Tymon\JWTAuth\Http\Parser\AuthHeaders; -use Tymon\JWTAuth\Http\Parser\Cookies; -use Tymon\JWTAuth\Http\Parser\InputSource; -use Tymon\JWTAuth\Http\Parser\LumenRouteParams; -use Tymon\JWTAuth\Http\Parser\Parser; -use Tymon\JWTAuth\Http\Parser\QueryString; -use Tymon\JWTAuth\Http\Parser\RouteParams; -use Tymon\JWTAuth\Test\AbstractTestCase; +use PHPOpenSourceSaver\JWTAuth\Contracts\Http\Parser as ParserContract; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\AuthHeaders; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\Cookies; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\InputSource; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\LumenRouteParams; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\Parser; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\QueryString; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\RouteParams; +use PHPOpenSourceSaver\JWTAuth\Test\AbstractTestCase; class ParserTest extends AbstractTestCase { diff --git a/tests/JWTAuthTest.php b/tests/JWTAuthTest.php index f3499fb1..7548a2a2 100644 --- a/tests/JWTAuthTest.php +++ b/tests/JWTAuthTest.php @@ -9,41 +9,41 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test; +namespace PHPOpenSourceSaver\JWTAuth\Test; use Illuminate\Http\Request; use Mockery; use stdClass; -use Tymon\JWTAuth\Contracts\Providers\Auth; -use Tymon\JWTAuth\Exceptions\JWTException; -use Tymon\JWTAuth\Exceptions\TokenInvalidException; -use Tymon\JWTAuth\Factory; -use Tymon\JWTAuth\Http\Parser\Parser; -use Tymon\JWTAuth\JWTAuth; -use Tymon\JWTAuth\Manager; -use Tymon\JWTAuth\Payload; -use Tymon\JWTAuth\Test\Stubs\UserStub; -use Tymon\JWTAuth\Token; +use PHPOpenSourceSaver\JWTAuth\Contracts\Providers\Auth; +use PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenInvalidException; +use PHPOpenSourceSaver\JWTAuth\Factory; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\Parser; +use PHPOpenSourceSaver\JWTAuth\JWTAuth; +use PHPOpenSourceSaver\JWTAuth\Manager; +use PHPOpenSourceSaver\JWTAuth\Payload; +use PHPOpenSourceSaver\JWTAuth\Test\Stubs\UserStub; +use PHPOpenSourceSaver\JWTAuth\Token; class JWTAuthTest extends AbstractTestCase { /** - * @var \Mockery\MockInterface|\Tymon\JWTAuth\Manager + * @var \Mockery\MockInterface|\PHPOpenSourceSaver\JWTAuth\Manager */ protected $manager; /** - * @var \Mockery\MockInterface|\Tymon\JWTAuth\Contracts\Providers\Auth + * @var \Mockery\MockInterface|\PHPOpenSourceSaver\JWTAuth\Contracts\Providers\Auth */ protected $auth; /** - * @var \Mockery\MockInterface|\Tymon\JWTAuth\Http\Parser\Parser + * @var \Mockery\MockInterface|\PHPOpenSourceSaver\JWTAuth\Http\Parser\Parser */ protected $parser; /** - * @var \Tymon\JWTAuth\JWTAuth + * @var \PHPOpenSourceSaver\JWTAuth\JWTAuth */ protected $jwtAuth; @@ -64,7 +64,7 @@ public function it_should_return_a_token_when_passing_a_user() $this->manager ->shouldReceive('getPayloadFactory->customClaims') ->once() - ->with(['sub' => 1, 'prv' => sha1('Tymon\JWTAuth\Test\Stubs\UserStub'), 'foo' => 'bar', 'role' => 'admin']) + ->with(['sub' => 1, 'prv' => sha1('PHPOpenSourceSaver\JWTAuth\Test\Stubs\UserStub'), 'foo' => 'bar', 'role' => 'admin']) ->andReturn($payloadFactory); $this->manager->shouldReceive('encode->get')->once()->andReturn('foo.bar.baz'); @@ -81,11 +81,11 @@ public function it_should_pass_provider_check_if_hash_matches() $payloadFactory->shouldReceive('make')->andReturn(Mockery::mock(Payload::class)); $payloadFactory->shouldReceive('get') ->with('prv') - ->andReturn(sha1('Tymon\JWTAuth\Test\Stubs\UserStub')); + ->andReturn(sha1('PHPOpenSourceSaver\JWTAuth\Test\Stubs\UserStub')); $this->manager->shouldReceive('decode')->once()->andReturn($payloadFactory); - $this->assertTrue($this->jwtAuth->setToken('foo.bar.baz')->checkSubjectModel('Tymon\JWTAuth\Test\Stubs\UserStub')); + $this->assertTrue($this->jwtAuth->setToken('foo.bar.baz')->checkSubjectModel('PHPOpenSourceSaver\JWTAuth\Test\Stubs\UserStub')); } /** @test */ @@ -99,7 +99,7 @@ public function it_should_pass_provider_check_if_hash_matches_when_provider_is_n $this->manager->shouldReceive('decode')->once()->andReturn($payloadFactory); - $this->assertTrue($this->jwtAuth->setToken('foo.bar.baz')->checkSubjectModel('Tymon\JWTAuth\Test\Stubs\UserStub')); + $this->assertTrue($this->jwtAuth->setToken('foo.bar.baz')->checkSubjectModel('PHPOpenSourceSaver\JWTAuth\Test\Stubs\UserStub')); } /** @test */ @@ -109,11 +109,11 @@ public function it_should_not_pass_provider_check_if_hash_not_match() $payloadFactory->shouldReceive('make')->andReturn(Mockery::mock(Payload::class)); $payloadFactory->shouldReceive('get') ->with('prv') - ->andReturn(sha1('Tymon\JWTAuth\Test\Stubs\UserStub1')); + ->andReturn(sha1('PHPOpenSourceSaver\JWTAuth\Test\Stubs\UserStub1')); $this->manager->shouldReceive('decode')->once()->andReturn($payloadFactory); - $this->assertFalse($this->jwtAuth->setToken('foo.bar.baz')->checkSubjectModel('Tymon\JWTAuth\Test\Stubs\UserStub')); + $this->assertFalse($this->jwtAuth->setToken('foo.bar.baz')->checkSubjectModel('PHPOpenSourceSaver\JWTAuth\Test\Stubs\UserStub')); } /** @test */ @@ -125,7 +125,7 @@ public function it_should_return_a_token_when_passing_valid_credentials_to_attem $this->manager ->shouldReceive('getPayloadFactory->customClaims') ->once() - ->with(['sub' => 1, 'prv' => sha1('Tymon\JWTAuth\Test\Stubs\UserStub'), 'foo' => 'bar', 'role' => 'admin']) + ->with(['sub' => 1, 'prv' => sha1('PHPOpenSourceSaver\JWTAuth\Test\Stubs\UserStub'), 'foo' => 'bar', 'role' => 'admin']) ->andReturn($payloadFactory); $this->manager->shouldReceive('encode->get')->once()->andReturn('foo.bar.baz'); diff --git a/tests/JWTGuardTest.php b/tests/JWTGuardTest.php index d15ca5a5..4b9aa91c 100644 --- a/tests/JWTGuardTest.php +++ b/tests/JWTGuardTest.php @@ -9,23 +9,23 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test; +namespace PHPOpenSourceSaver\JWTAuth\Test; use Illuminate\Auth\EloquentUserProvider; use Illuminate\Http\Request; use Mockery; -use Tymon\JWTAuth\Exceptions\JWTException; -use Tymon\JWTAuth\Exceptions\UserNotDefinedException; -use Tymon\JWTAuth\Factory; -use Tymon\JWTAuth\JWT; -use Tymon\JWTAuth\JWTGuard; -use Tymon\JWTAuth\Payload; -use Tymon\JWTAuth\Test\Stubs\LaravelUserStub; +use PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException; +use PHPOpenSourceSaver\JWTAuth\Exceptions\UserNotDefinedException; +use PHPOpenSourceSaver\JWTAuth\Factory; +use PHPOpenSourceSaver\JWTAuth\JWT; +use PHPOpenSourceSaver\JWTAuth\JWTGuard; +use PHPOpenSourceSaver\JWTAuth\Payload; +use PHPOpenSourceSaver\JWTAuth\Test\Stubs\LaravelUserStub; class JWTGuardTest extends AbstractTestCase { /** - * @var \Tymon\JWTAuth\JWT|\Mockery\MockInterface + * @var \PHPOpenSourceSaver\JWTAuth\JWT|\Mockery\MockInterface */ protected $jwt; @@ -35,7 +35,7 @@ class JWTGuardTest extends AbstractTestCase protected $provider; /** - * @var \Tymon\JWTAuth\JWTGuard|\Mockery\MockInterface + * @var \PHPOpenSourceSaver\JWTAuth\JWTGuard|\Mockery\MockInterface */ protected $guard; @@ -65,12 +65,12 @@ public function it_should_get_the_authenticated_user_if_a_valid_token_is_provide $this->jwt->shouldReceive('check')->once()->with(true)->andReturn($payload); $this->jwt->shouldReceive('checkSubjectModel') ->once() - ->with('\Tymon\JWTAuth\Test\Stubs\LaravelUserStub') + ->with('\PHPOpenSourceSaver\JWTAuth\Test\Stubs\LaravelUserStub') ->andReturn(true); $this->provider->shouldReceive('getModel') ->once() - ->andReturn('\Tymon\JWTAuth\Test\Stubs\LaravelUserStub'); + ->andReturn('\PHPOpenSourceSaver\JWTAuth\Test\Stubs\LaravelUserStub'); $this->provider->shouldReceive('retrieveById') ->once() ->with(1) @@ -97,12 +97,12 @@ public function it_should_get_the_authenticated_user_if_a_valid_token_is_provide $this->jwt->shouldReceive('check')->once()->with(true)->andReturn($payload); $this->jwt->shouldReceive('checkSubjectModel') ->once() - ->with('\Tymon\JWTAuth\Test\Stubs\LaravelUserStub') + ->with('\PHPOpenSourceSaver\JWTAuth\Test\Stubs\LaravelUserStub') ->andReturn(true); $this->provider->shouldReceive('getModel') ->once() - ->andReturn('\Tymon\JWTAuth\Test\Stubs\LaravelUserStub'); + ->andReturn('\PHPOpenSourceSaver\JWTAuth\Test\Stubs\LaravelUserStub'); $this->provider->shouldReceive('retrieveById') ->once() ->with(1) diff --git a/tests/ManagerTest.php b/tests/ManagerTest.php index aee83ffa..b888ca4a 100644 --- a/tests/ManagerTest.php +++ b/tests/ManagerTest.php @@ -9,45 +9,45 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test; +namespace PHPOpenSourceSaver\JWTAuth\Test; use Mockery; -use Tymon\JWTAuth\Blacklist; -use Tymon\JWTAuth\Claims\Collection; -use Tymon\JWTAuth\Claims\Expiration; -use Tymon\JWTAuth\Claims\IssuedAt; -use Tymon\JWTAuth\Claims\Issuer; -use Tymon\JWTAuth\Claims\JwtId; -use Tymon\JWTAuth\Claims\NotBefore; -use Tymon\JWTAuth\Claims\Subject; -use Tymon\JWTAuth\Contracts\Providers\JWT; -use Tymon\JWTAuth\Exceptions\JWTException; -use Tymon\JWTAuth\Exceptions\TokenBlacklistedException; -use Tymon\JWTAuth\Factory; -use Tymon\JWTAuth\Manager; -use Tymon\JWTAuth\Payload; -use Tymon\JWTAuth\Token; -use Tymon\JWTAuth\Validators\PayloadValidator; +use PHPOpenSourceSaver\JWTAuth\Blacklist; +use PHPOpenSourceSaver\JWTAuth\Claims\Collection; +use PHPOpenSourceSaver\JWTAuth\Claims\Expiration; +use PHPOpenSourceSaver\JWTAuth\Claims\IssuedAt; +use PHPOpenSourceSaver\JWTAuth\Claims\Issuer; +use PHPOpenSourceSaver\JWTAuth\Claims\JwtId; +use PHPOpenSourceSaver\JWTAuth\Claims\NotBefore; +use PHPOpenSourceSaver\JWTAuth\Claims\Subject; +use PHPOpenSourceSaver\JWTAuth\Contracts\Providers\JWT; +use PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenBlacklistedException; +use PHPOpenSourceSaver\JWTAuth\Factory; +use PHPOpenSourceSaver\JWTAuth\Manager; +use PHPOpenSourceSaver\JWTAuth\Payload; +use PHPOpenSourceSaver\JWTAuth\Token; +use PHPOpenSourceSaver\JWTAuth\Validators\PayloadValidator; class ManagerTest extends AbstractTestCase { /** - * @var \Mockery\MockInterface|\Tymon\JWTAuth\Contracts\Providers\JWT + * @var \Mockery\MockInterface|\PHPOpenSourceSaver\JWTAuth\Contracts\Providers\JWT */ protected $jwt; /** - * @var \Mockery\MockInterface|\Tymon\JWTAuth\Blacklist + * @var \Mockery\MockInterface|\PHPOpenSourceSaver\JWTAuth\Blacklist */ protected $blacklist; /** - * @var \Mockery\MockInterface|\Tymon\JWTAuth\Factory + * @var \Mockery\MockInterface|\PHPOpenSourceSaver\JWTAuth\Factory */ protected $factory; /** - * @var \Tymon\JWTAuth\Manager + * @var \PHPOpenSourceSaver\JWTAuth\Manager */ protected $manager; diff --git a/tests/Middleware/AbstractMiddlewareTest.php b/tests/Middleware/AbstractMiddlewareTest.php index 6f8fa413..54704b4e 100644 --- a/tests/Middleware/AbstractMiddlewareTest.php +++ b/tests/Middleware/AbstractMiddlewareTest.php @@ -9,17 +9,17 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Middleware; +namespace PHPOpenSourceSaver\JWTAuth\Test\Middleware; use Illuminate\Http\Request; use Mockery; -use Tymon\JWTAuth\JWTAuth; -use Tymon\JWTAuth\Test\AbstractTestCase; +use PHPOpenSourceSaver\JWTAuth\JWTAuth; +use PHPOpenSourceSaver\JWTAuth\Test\AbstractTestCase; abstract class AbstractMiddlewareTest extends AbstractTestCase { /** - * @var \Mockery\MockInterface|\Tymon\JWTAuth\JWTAuth + * @var \Mockery\MockInterface|\PHPOpenSourceSaver\JWTAuth\JWTAuth */ protected $auth; diff --git a/tests/Middleware/AuthenticateAndRenewTest.php b/tests/Middleware/AuthenticateAndRenewTest.php index 31321e35..9b2ba7de 100644 --- a/tests/Middleware/AuthenticateAndRenewTest.php +++ b/tests/Middleware/AuthenticateAndRenewTest.php @@ -9,20 +9,20 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Middleware; +namespace PHPOpenSourceSaver\JWTAuth\Test\Middleware; use Illuminate\Http\Response; use Mockery; use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException; -use Tymon\JWTAuth\Exceptions\TokenInvalidException; -use Tymon\JWTAuth\Http\Middleware\AuthenticateAndRenew; -use Tymon\JWTAuth\Http\Parser\Parser; -use Tymon\JWTAuth\Test\Stubs\UserStub; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenInvalidException; +use PHPOpenSourceSaver\JWTAuth\Http\Middleware\AuthenticateAndRenew; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\Parser; +use PHPOpenSourceSaver\JWTAuth\Test\Stubs\UserStub; class AuthenticateAndRenewTest extends AbstractMiddlewareTest { /** - * @var \Tymon\JWTAuth\Http\Middleware\Authenticate|\Tymon\JWTAuth\Http\Middleware\AuthenticateAndRenew + * @var \PHPOpenSourceSaver\JWTAuth\Http\Middleware\Authenticate|\PHPOpenSourceSaver\JWTAuth\Http\Middleware\AuthenticateAndRenew */ protected $middleware; diff --git a/tests/Middleware/AuthenticateTest.php b/tests/Middleware/AuthenticateTest.php index 0872323b..d942f0bc 100644 --- a/tests/Middleware/AuthenticateTest.php +++ b/tests/Middleware/AuthenticateTest.php @@ -9,19 +9,19 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Middleware; +namespace PHPOpenSourceSaver\JWTAuth\Test\Middleware; use Mockery; use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException; -use Tymon\JWTAuth\Exceptions\TokenInvalidException; -use Tymon\JWTAuth\Http\Middleware\Authenticate; -use Tymon\JWTAuth\Http\Parser\Parser; -use Tymon\JWTAuth\Test\Stubs\UserStub; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenInvalidException; +use PHPOpenSourceSaver\JWTAuth\Http\Middleware\Authenticate; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\Parser; +use PHPOpenSourceSaver\JWTAuth\Test\Stubs\UserStub; class AuthenticateTest extends AbstractMiddlewareTest { /** - * @var \Tymon\JWTAuth\Http\Middleware\Authenticate + * @var \PHPOpenSourceSaver\JWTAuth\Http\Middleware\Authenticate */ protected $middleware; diff --git a/tests/Middleware/CheckTest.php b/tests/Middleware/CheckTest.php index 4a48ffa9..929629aa 100644 --- a/tests/Middleware/CheckTest.php +++ b/tests/Middleware/CheckTest.php @@ -9,18 +9,18 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Middleware; +namespace PHPOpenSourceSaver\JWTAuth\Test\Middleware; use Mockery; -use Tymon\JWTAuth\Exceptions\TokenInvalidException; -use Tymon\JWTAuth\Http\Middleware\Check; -use Tymon\JWTAuth\Http\Parser\Parser; -use Tymon\JWTAuth\Test\Stubs\UserStub; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenInvalidException; +use PHPOpenSourceSaver\JWTAuth\Http\Middleware\Check; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\Parser; +use PHPOpenSourceSaver\JWTAuth\Test\Stubs\UserStub; class CheckTest extends AbstractMiddlewareTest { /** - * @var \Tymon\JWTAuth\Http\Middleware\Check + * @var \PHPOpenSourceSaver\JWTAuth\Http\Middleware\Check */ protected $middleware; diff --git a/tests/Middleware/RefreshTokenTest.php b/tests/Middleware/RefreshTokenTest.php index 4cb2aca8..edc3d16b 100644 --- a/tests/Middleware/RefreshTokenTest.php +++ b/tests/Middleware/RefreshTokenTest.php @@ -9,19 +9,19 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Middleware; +namespace PHPOpenSourceSaver\JWTAuth\Test\Middleware; use Illuminate\Http\Response; use Mockery; use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException; -use Tymon\JWTAuth\Exceptions\TokenInvalidException; -use Tymon\JWTAuth\Http\Middleware\RefreshToken; -use Tymon\JWTAuth\Http\Parser\Parser; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenInvalidException; +use PHPOpenSourceSaver\JWTAuth\Http\Middleware\RefreshToken; +use PHPOpenSourceSaver\JWTAuth\Http\Parser\Parser; class RefreshTokenTest extends AbstractMiddlewareTest { /** - * @var \Tymon\JWTAuth\Http\Middleware\RefreshToken + * @var \PHPOpenSourceSaver\JWTAuth\Http\Middleware\RefreshToken */ protected $middleware; diff --git a/tests/PayloadTest.php b/tests/PayloadTest.php index 5d6263de..48e95846 100644 --- a/tests/PayloadTest.php +++ b/tests/PayloadTest.php @@ -9,32 +9,32 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test; +namespace PHPOpenSourceSaver\JWTAuth\Test; use BadMethodCallException; use Mockery; -use Tymon\JWTAuth\Claims\Audience; -use Tymon\JWTAuth\Claims\Claim; -use Tymon\JWTAuth\Claims\Collection; -use Tymon\JWTAuth\Claims\Expiration; -use Tymon\JWTAuth\Claims\IssuedAt; -use Tymon\JWTAuth\Claims\Issuer; -use Tymon\JWTAuth\Claims\JwtId; -use Tymon\JWTAuth\Claims\NotBefore; -use Tymon\JWTAuth\Claims\Subject; -use Tymon\JWTAuth\Exceptions\PayloadException; -use Tymon\JWTAuth\Payload; -use Tymon\JWTAuth\Validators\PayloadValidator; +use PHPOpenSourceSaver\JWTAuth\Claims\Audience; +use PHPOpenSourceSaver\JWTAuth\Claims\Claim; +use PHPOpenSourceSaver\JWTAuth\Claims\Collection; +use PHPOpenSourceSaver\JWTAuth\Claims\Expiration; +use PHPOpenSourceSaver\JWTAuth\Claims\IssuedAt; +use PHPOpenSourceSaver\JWTAuth\Claims\Issuer; +use PHPOpenSourceSaver\JWTAuth\Claims\JwtId; +use PHPOpenSourceSaver\JWTAuth\Claims\NotBefore; +use PHPOpenSourceSaver\JWTAuth\Claims\Subject; +use PHPOpenSourceSaver\JWTAuth\Exceptions\PayloadException; +use PHPOpenSourceSaver\JWTAuth\Payload; +use PHPOpenSourceSaver\JWTAuth\Validators\PayloadValidator; class PayloadTest extends AbstractTestCase { /** - * @var \Mockery\MockInterface|\Tymon\JWTAuth\Validators\PayloadValidator + * @var \Mockery\MockInterface|\PHPOpenSourceSaver\JWTAuth\Validators\PayloadValidator */ protected $validator; /** - * @var \Tymon\JWTAuth\Payload + * @var \PHPOpenSourceSaver\JWTAuth\Payload */ protected $payload; @@ -48,7 +48,7 @@ public function setUp(): void /** * @param array $extraClaims * - * @return \Tymon\JWTAuth\Payload + * @return \PHPOpenSourceSaver\JWTAuth\Payload */ private function getTestPayload(array $extraClaims = []) { diff --git a/tests/Providers/Auth/IlluminateTest.php b/tests/Providers/Auth/IlluminateTest.php index b850c1f0..94bca150 100644 --- a/tests/Providers/Auth/IlluminateTest.php +++ b/tests/Providers/Auth/IlluminateTest.php @@ -9,12 +9,12 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Providers\Auth; +namespace PHPOpenSourceSaver\JWTAuth\Test\Providers\Auth; use Illuminate\Contracts\Auth\Guard; use Mockery; -use Tymon\JWTAuth\Providers\Auth\Illuminate as Auth; -use Tymon\JWTAuth\Test\AbstractTestCase; +use PHPOpenSourceSaver\JWTAuth\Providers\Auth\Illuminate as Auth; +use PHPOpenSourceSaver\JWTAuth\Test\AbstractTestCase; class IlluminateTest extends AbstractTestCase { @@ -24,7 +24,7 @@ class IlluminateTest extends AbstractTestCase protected $authManager; /** - * @var \Tymon\JWTAuth\Providers\Auth\Illuminate + * @var \PHPOpenSourceSaver\JWTAuth\Providers\Auth\Illuminate */ protected $auth; diff --git a/tests/Providers/JWT/LcobucciTest.php b/tests/Providers/JWT/LcobucciTest.php index e3983023..dd4ac3b2 100644 --- a/tests/Providers/JWT/LcobucciTest.php +++ b/tests/Providers/JWT/LcobucciTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Providers\JWT; +namespace PHPOpenSourceSaver\JWTAuth\Test\Providers\JWT; use Exception; use InvalidArgumentException; @@ -17,10 +17,10 @@ use Lcobucci\JWT\Parser; use Lcobucci\JWT\Signer\Key; use Mockery; -use Tymon\JWTAuth\Exceptions\JWTException; -use Tymon\JWTAuth\Exceptions\TokenInvalidException; -use Tymon\JWTAuth\Providers\JWT\Lcobucci; -use Tymon\JWTAuth\Test\AbstractTestCase; +use PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenInvalidException; +use PHPOpenSourceSaver\JWTAuth\Providers\JWT\Lcobucci; +use PHPOpenSourceSaver\JWTAuth\Test\AbstractTestCase; class LcobucciTest extends AbstractTestCase { @@ -35,7 +35,7 @@ class LcobucciTest extends AbstractTestCase protected $builder; /** - * @var \Tymon\JWTAuth\Providers\JWT\Namshi + * @var \PHPOpenSourceSaver\JWTAuth\Providers\JWT\Namshi */ protected $provider; diff --git a/tests/Providers/JWT/NamshiTest.php b/tests/Providers/JWT/NamshiTest.php index a8d80138..3f3e4487 100644 --- a/tests/Providers/JWT/NamshiTest.php +++ b/tests/Providers/JWT/NamshiTest.php @@ -9,16 +9,16 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Providers\JWT; +namespace PHPOpenSourceSaver\JWTAuth\Test\Providers\JWT; use Exception; use InvalidArgumentException; use Mockery; use Namshi\JOSE\JWS; -use Tymon\JWTAuth\Exceptions\JWTException; -use Tymon\JWTAuth\Exceptions\TokenInvalidException; -use Tymon\JWTAuth\Providers\JWT\Namshi; -use Tymon\JWTAuth\Test\AbstractTestCase; +use PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenInvalidException; +use PHPOpenSourceSaver\JWTAuth\Providers\JWT\Namshi; +use PHPOpenSourceSaver\JWTAuth\Test\AbstractTestCase; class NamshiTest extends AbstractTestCase { @@ -28,7 +28,7 @@ class NamshiTest extends AbstractTestCase protected $jws; /** - * @var \Tymon\JWTAuth\Providers\JWT\Namshi + * @var \PHPOpenSourceSaver\JWTAuth\Providers\JWT\Namshi */ protected $provider; diff --git a/tests/Providers/JWT/ProviderTest.php b/tests/Providers/JWT/ProviderTest.php index be4942d0..f921ce94 100644 --- a/tests/Providers/JWT/ProviderTest.php +++ b/tests/Providers/JWT/ProviderTest.php @@ -9,15 +9,15 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Providers\JWT; +namespace PHPOpenSourceSaver\JWTAuth\Test\Providers\JWT; -use Tymon\JWTAuth\Test\AbstractTestCase; -use Tymon\JWTAuth\Test\Stubs\JWTProviderStub; +use PHPOpenSourceSaver\JWTAuth\Test\AbstractTestCase; +use PHPOpenSourceSaver\JWTAuth\Test\Stubs\JWTProviderStub; class ProviderTest extends AbstractTestCase { /** - * @var \Tymon\JWTAuth\Test\Stubs\JWTProviderStub + * @var \PHPOpenSourceSaver\JWTAuth\Test\Stubs\JWTProviderStub */ protected $provider; diff --git a/tests/Providers/Storage/IlluminateTest.php b/tests/Providers/Storage/IlluminateTest.php index 3817c865..1974ed1c 100644 --- a/tests/Providers/Storage/IlluminateTest.php +++ b/tests/Providers/Storage/IlluminateTest.php @@ -9,13 +9,13 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Providers\Storage; +namespace PHPOpenSourceSaver\JWTAuth\Test\Providers\Storage; use Illuminate\Contracts\Cache\Repository; use Mockery; -use Tymon\JWTAuth\Providers\Storage\Illuminate as Storage; -use Tymon\JWTAuth\Test\AbstractTestCase; -use Tymon\JWTAuth\Test\Stubs\TaggedStorage; +use PHPOpenSourceSaver\JWTAuth\Providers\Storage\Illuminate as Storage; +use PHPOpenSourceSaver\JWTAuth\Test\AbstractTestCase; +use PHPOpenSourceSaver\JWTAuth\Test\Stubs\TaggedStorage; class IlluminateTest extends AbstractTestCase { @@ -25,7 +25,7 @@ class IlluminateTest extends AbstractTestCase protected $cache; /** - * @var \Tymon\JWTAuth\Providers\Storage\Illuminate + * @var \PHPOpenSourceSaver\JWTAuth\Providers\Storage\Illuminate */ protected $storage; diff --git a/tests/Stubs/JWTProviderStub.php b/tests/Stubs/JWTProviderStub.php index ef47d913..cf11721c 100644 --- a/tests/Stubs/JWTProviderStub.php +++ b/tests/Stubs/JWTProviderStub.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Stubs; +namespace PHPOpenSourceSaver\JWTAuth\Test\Stubs; -use Tymon\JWTAuth\Providers\JWT\Provider; +use PHPOpenSourceSaver\JWTAuth\Providers\JWT\Provider; class JWTProviderStub extends Provider { diff --git a/tests/Stubs/LaravelUserStub.php b/tests/Stubs/LaravelUserStub.php index 97ca3e9f..d4636758 100644 --- a/tests/Stubs/LaravelUserStub.php +++ b/tests/Stubs/LaravelUserStub.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Stubs; +namespace PHPOpenSourceSaver\JWTAuth\Test\Stubs; use Illuminate\Contracts\Auth\Authenticatable; -use Tymon\JWTAuth\Contracts\JWTSubject; +use PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject; class LaravelUserStub extends UserStub implements Authenticatable, JWTSubject { diff --git a/tests/Stubs/TaggedStorage.php b/tests/Stubs/TaggedStorage.php index e1b73c98..b9d7746b 100644 --- a/tests/Stubs/TaggedStorage.php +++ b/tests/Stubs/TaggedStorage.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Stubs; +namespace PHPOpenSourceSaver\JWTAuth\Test\Stubs; -use Tymon\JWTAuth\Providers\Storage\Illuminate as Storage; +use PHPOpenSourceSaver\JWTAuth\Providers\Storage\Illuminate as Storage; class TaggedStorage extends Storage { diff --git a/tests/Stubs/UserStub.php b/tests/Stubs/UserStub.php index 0b3e94ff..769d7ff6 100644 --- a/tests/Stubs/UserStub.php +++ b/tests/Stubs/UserStub.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Stubs; +namespace PHPOpenSourceSaver\JWTAuth\Test\Stubs; -use Tymon\JWTAuth\Contracts\JWTSubject; +use PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject; class UserStub implements JWTSubject { diff --git a/tests/TokenTest.php b/tests/TokenTest.php index 034f7b87..bdecacba 100644 --- a/tests/TokenTest.php +++ b/tests/TokenTest.php @@ -9,14 +9,14 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test; +namespace PHPOpenSourceSaver\JWTAuth\Test; -use Tymon\JWTAuth\Token; +use PHPOpenSourceSaver\JWTAuth\Token; class TokenTest extends AbstractTestCase { /** - * @var \Tymon\JWTAuth\Token + * @var \PHPOpenSourceSaver\JWTAuth\Token */ protected $token; diff --git a/tests/Validators/PayloadValidatorTest.php b/tests/Validators/PayloadValidatorTest.php index 91d31ef1..9941143b 100644 --- a/tests/Validators/PayloadValidatorTest.php +++ b/tests/Validators/PayloadValidatorTest.php @@ -9,25 +9,25 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Validators; - -use Tymon\JWTAuth\Claims\Collection; -use Tymon\JWTAuth\Claims\Expiration; -use Tymon\JWTAuth\Claims\IssuedAt; -use Tymon\JWTAuth\Claims\Issuer; -use Tymon\JWTAuth\Claims\JwtId; -use Tymon\JWTAuth\Claims\NotBefore; -use Tymon\JWTAuth\Claims\Subject; -use Tymon\JWTAuth\Exceptions\InvalidClaimException; -use Tymon\JWTAuth\Exceptions\TokenExpiredException; -use Tymon\JWTAuth\Exceptions\TokenInvalidException; -use Tymon\JWTAuth\Test\AbstractTestCase; -use Tymon\JWTAuth\Validators\PayloadValidator; +namespace PHPOpenSourceSaver\JWTAuth\Test\Validators; + +use PHPOpenSourceSaver\JWTAuth\Claims\Collection; +use PHPOpenSourceSaver\JWTAuth\Claims\Expiration; +use PHPOpenSourceSaver\JWTAuth\Claims\IssuedAt; +use PHPOpenSourceSaver\JWTAuth\Claims\Issuer; +use PHPOpenSourceSaver\JWTAuth\Claims\JwtId; +use PHPOpenSourceSaver\JWTAuth\Claims\NotBefore; +use PHPOpenSourceSaver\JWTAuth\Claims\Subject; +use PHPOpenSourceSaver\JWTAuth\Exceptions\InvalidClaimException; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenExpiredException; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenInvalidException; +use PHPOpenSourceSaver\JWTAuth\Test\AbstractTestCase; +use PHPOpenSourceSaver\JWTAuth\Validators\PayloadValidator; class PayloadValidatorTest extends AbstractTestCase { /** - * @var \Tymon\JWTAuth\Validators\PayloadValidator + * @var \PHPOpenSourceSaver\JWTAuth\Validators\PayloadValidator */ protected $validator; diff --git a/tests/Validators/TokenValidatorTest.php b/tests/Validators/TokenValidatorTest.php index 68b3cec0..98de51ad 100644 --- a/tests/Validators/TokenValidatorTest.php +++ b/tests/Validators/TokenValidatorTest.php @@ -9,16 +9,16 @@ * file that was distributed with this source code. */ -namespace Tymon\JWTAuth\Test\Validators; +namespace PHPOpenSourceSaver\JWTAuth\Test\Validators; -use Tymon\JWTAuth\Exceptions\TokenInvalidException; -use Tymon\JWTAuth\Test\AbstractTestCase; -use Tymon\JWTAuth\Validators\TokenValidator; +use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenInvalidException; +use PHPOpenSourceSaver\JWTAuth\Test\AbstractTestCase; +use PHPOpenSourceSaver\JWTAuth\Validators\TokenValidator; class TokenValidatorTest extends AbstractTestCase { /** - * @var \Tymon\JWTAuth\Validators\TokenValidator + * @var \PHPOpenSourceSaver\JWTAuth\Validators\TokenValidator */ protected $validator; @@ -37,7 +37,7 @@ public function it_should_return_true_when_providing_a_well_formed_token() /** * @test - * @dataProvider \Tymon\JWTAuth\Test\Validators\TokenValidatorTest::dataProviderMalformedTokens + * @dataProvider \PHPOpenSourceSaver\JWTAuth\Test\Validators\TokenValidatorTest::dataProviderMalformedTokens * * @param string $token */ @@ -48,7 +48,7 @@ public function it_should_return_false_when_providing_a_malformed_token($token) /** * @test - * @dataProvider \Tymon\JWTAuth\Test\Validators\TokenValidatorTest::dataProviderMalformedTokens + * @dataProvider \PHPOpenSourceSaver\JWTAuth\Test\Validators\TokenValidatorTest::dataProviderMalformedTokens */ public function it_should_throw_an_exception_when_providing_a_malformed_token($token) { @@ -60,7 +60,7 @@ public function it_should_throw_an_exception_when_providing_a_malformed_token($t /** * @test - * @dataProvider \Tymon\JWTAuth\Test\Validators\TokenValidatorTest::dataProviderTokensWithWrongSegmentsNumber + * @dataProvider \PHPOpenSourceSaver\JWTAuth\Test\Validators\TokenValidatorTest::dataProviderTokensWithWrongSegmentsNumber */ public function it_should_return_false_when_providing_a_token_with_wrong_segments_number($token) { @@ -69,7 +69,7 @@ public function it_should_return_false_when_providing_a_token_with_wrong_segment /** * @test - * @dataProvider \Tymon\JWTAuth\Test\Validators\TokenValidatorTest::dataProviderTokensWithWrongSegmentsNumber + * @dataProvider \PHPOpenSourceSaver\JWTAuth\Test\Validators\TokenValidatorTest::dataProviderTokensWithWrongSegmentsNumber */ public function it_should_throw_an_exception_when_providing_a_malformed_token_with_wrong_segments_number($token) {