Skip to content

Commit

Permalink
Merge pull request #6 from eschricker/refactor/change-namespace
Browse files Browse the repository at this point in the history
changed namespace to PHPOpenSourceSaver
  • Loading branch information
Messhias authored Sep 21, 2021
2 parents ab00f2d + a50023a commit 3c525d4
Show file tree
Hide file tree
Showing 104 changed files with 541 additions and 541 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
30 changes: 15 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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": [
Expand All @@ -20,6 +20,11 @@
"email": "[email protected]",
"homepage": "https://tymon.xyz",
"role": "Developer"
},
{
"name": "Eric Schricker",
"email": "[email protected]",
"role": "Developer"
}
],
"require": {
Expand All @@ -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": {
Expand All @@ -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
},
Expand Down
6 changes: 3 additions & 3 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
|
*/

'jwt' => Tymon\JWTAuth\Providers\JWT\Lcobucci::class,
'jwt' => PHPOpenSourceSaver\JWTAuth\Providers\JWT\Lcobucci::class,

/*
|--------------------------------------------------------------------------
Expand All @@ -286,7 +286,7 @@
|
*/

'auth' => Tymon\JWTAuth\Providers\Auth\Illuminate::class,
'auth' => PHPOpenSourceSaver\JWTAuth\Providers\Auth\Illuminate::class,

/*
|--------------------------------------------------------------------------
Expand All @@ -297,7 +297,7 @@
|
*/

'storage' => Tymon\JWTAuth\Providers\Storage\Illuminate::class,
'storage' => PHPOpenSourceSaver\JWTAuth\Providers\Storage\Illuminate::class,

],

Expand Down
4 changes: 2 additions & 2 deletions docs/auth-guard.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions docs/laravel-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]
```

Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/lumen-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;

Expand Down
22 changes: 11 additions & 11 deletions src/Blacklist.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -47,7 +47,7 @@ class Blacklist
/**
* Constructor.
*
* @param \Tymon\JWTAuth\Contracts\Providers\Storage $storage
* @param \PHPOpenSourceSaver\JWTAuth\Contracts\Providers\Storage $storage
*
* @return void
*/
Expand All @@ -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
*/
Expand Down Expand Up @@ -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
*/
Expand All @@ -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
*/
Expand All @@ -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
*/
Expand All @@ -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
*/
Expand Down Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Claims/Audience.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Tymon\JWTAuth\Claims;
namespace PHPOpenSourceSaver\JWTAuth\Claims;

class Audience extends Claim
{
Expand Down
6 changes: 3 additions & 3 deletions src/Claims/Claim.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -47,7 +47,7 @@ public function __construct($value)
*
* @param mixed $value
*
* @throws \Tymon\JWTAuth\Exceptions\InvalidClaimException
* @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\InvalidClaimException
*
* @return $this
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Claims/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Claims/Custom.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Tymon\JWTAuth\Claims;
namespace PHPOpenSourceSaver\JWTAuth\Claims;

class Custom extends Claim
{
Expand Down
8 changes: 4 additions & 4 deletions src/Claims/DatetimeTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -30,7 +30,7 @@ trait DatetimeTrait
*
* @param mixed $value
*
* @throws \Tymon\JWTAuth\Exceptions\InvalidClaimException
* @throws \PHPOpenSourceSaver\JWTAuth\Exceptions\InvalidClaimException
*
* @return $this
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Claims/Expiration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
8 changes: 4 additions & 4 deletions src/Claims/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down
8 changes: 4 additions & 4 deletions src/Claims/IssuedAt.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Loading

0 comments on commit 3c525d4

Please sign in to comment.