Skip to content

Commit

Permalink
Merge pull request #70 from bkrajendra/main
Browse files Browse the repository at this point in the history
Fix: replaced tymon/jwt-auth with php-open-source-saver/jwt-auth
  • Loading branch information
rluders authored Mar 29, 2023
2 parents a6ca1e2 + 094dc56 commit e4c95ea
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 13 deletions.
1 change: 1 addition & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
comment: off
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,4 @@ $RECYCLE.BIN/


# End of https://www.gitignore.io/api/osx,linux,windows,composer
composer.lock
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="https://octobercms.com/storage/app/uploads/public/58b/8a6/0b5/58b8a60b50133737978501.png" style="border:1px solid #ddd;width:auto;">
<img src="jwt.png" style="border:1px solid #ddd;width:auto;">
</p>

<p align="center">
Expand Down
2 changes: 1 addition & 1 deletion classes/AuthAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Winter\Storm\Auth\AuthException;
use RLuders\JWTAuth\Classes\AuthManager;
use Tymon\JWTAuth\Contracts\Providers\Auth as AuthInterface;
use PHPOpenSourceSaver\JWTAuth\Contracts\Providers\Auth as AuthInterface;

/**
* {@inheritDoc}
Expand Down
2 changes: 1 addition & 1 deletion classes/JWTAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace RLuders\JWTAuth\Classes;

use Tymon\JWTAuth\JWTAuth as BaseJWTAuth;
use PHPOpenSourceSaver\JWTAuth\JWTAuth as BaseJWTAuth;

class JWTAuth extends BaseJWTAuth
{
Expand Down
11 changes: 8 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@
"php": ">=7.0",
"composer/installers": "~1.0",
"winter/wn-user-plugin": "^2.0",
"tymon/jwt-auth": "~0.5|^1.0"
"php-open-source-saver/jwt-auth": "^2.1"
},
"minimum-stability": "dev",
"prefer-stable": true
}
"prefer-stable": true,
"config": {
"allow-plugins": {
"composer/installers": true
}
}
}
4 changes: 2 additions & 2 deletions config/jwt.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
|
*/

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

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

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

],

Expand Down
2 changes: 1 addition & 1 deletion exceptions/JsonValidationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function getHeaders(): array
];
}

public function toArray()
public function toArray(): array
{
return ['errors' => $this->getErrors()];
}
Expand Down
2 changes: 1 addition & 1 deletion http/controllers/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Illuminate\Http\Response;
use Illuminate\Routing\Controller;
use RLuders\JWTAuth\Classes\JWTAuth;
use Tymon\JWTAuth\Exceptions\JWTException;
use PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException;
use RLuders\JWTAuth\Http\Requests\LoginRequest;

class LoginController extends Controller
Expand Down
2 changes: 1 addition & 1 deletion http/controllers/RefreshTokenController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Illuminate\Routing\Controller;
use RLuders\JWTAuth\Classes\JWTAuth;
use RLuders\JWTAuth\Http\Requests\TokenRequest;
use Tymon\JWTAuth\Exceptions\TokenBlacklistedException;
use PHPOpenSourceSaver\JWTAuth\Exceptions\TokenBlacklistedException;

class RefreshTokenController extends Controller
{
Expand Down
Binary file added jwt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace RLuders\JWTAuth\Models;

use Tymon\JWTAuth\Contracts\JWTSubject;
use PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject;
use Winter\User\Models\User as BaseUser;

class User extends BaseUser implements JWTSubject
Expand Down
2 changes: 1 addition & 1 deletion providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Config;
use Response;
use Winter\User\Models\User;
use Tymon\JWTAuth\Providers\AbstractServiceProvider;
use PHPOpenSourceSaver\JWTAuth\Providers\AbstractServiceProvider;
use RLuders\JWTAuth\Models\Settings as PluginSettings;
use RLuders\JWTAuth\Exceptions\JsonValidationException;

Expand Down
3 changes: 3 additions & 0 deletions updates/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@
- Updates dependencies
- Fix language support
- Adds French language support
1.4.5:
- Updates dependencies - replaced tymon/jwt-auth with php-open-source-saver/jwt-auth
- Adds jwt-auth related refactoring

0 comments on commit e4c95ea

Please sign in to comment.