Skip to content

Commit

Permalink
Updated the namespace as this is a forked package and updated to use …
Browse files Browse the repository at this point in the history
…the latest version of the JWT package
  • Loading branch information
Chris-Pratt-Clystnet committed Feb 25, 2020
1 parent 28550dd commit c8b3e57
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 21 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/vendor
composer.lock
.DS_Store
.DS_Store
.idea
build
.phpunit.result.cache
27 changes: 19 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,44 @@
{
"name": "unisharp/laravel-jwt",
"description": "A jwt package for reisssuing token purpose based on jwt-auth package.",
"name": "clystnet/laravel-jwt",
"description": "A jwt package for reisssuing token purpose based on jwt-auth package. This is a fork of the unisharp/laravel-jwt package.",
"keywords": ["jwt", "reissue", "concurrency", "token", "laravel"],
"license": "MIT",
"authors": [
{
"name": "UniSharp Ltd.",
"email": "[email protected]"
},
{
"name": "Christopher Pratt",
"email": "[email protected]",
"homepage": "https://www.clystnet.com",
"role": "Developer"
}
],
"require": {
"php": "^5.6.4 || ^7.0",
"tymon/jwt-auth": "^1.0.0-rc.5.1",
"illuminate/support": ">=5.0.0"
"php": "^7.1",
"tymon/jwt-auth": "1.0.0-rc.5.1",
"illuminate/support": "^5.6 | ^6.0"
},
"require-dev": {

"mockery/mockery": "~1.3",
"phpunit/phpunit": "^8.5",
"codedungeon/phpunit-result-printer": "dev-master"
},
"autoload": {
"psr-4": {
"UniSharp\\JWT\\": "src/",
"Tests\\": "tests/"
}
},
"classmap": [
"src/"
]
},
"minimum-stability": "dev",
"extra": {
"laravel": {
"providers": [
"UniSharp\\JWT\\JWTServiceProvider"
"Clystnet\\JWT\\JWTServiceProvider"
],
"aliases": {
}
Expand Down
2 changes: 1 addition & 1 deletion src/Auth/Guards/JWTAuthGuard.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace UniSharp\JWT\Auth\Guards;
namespace Clystnet\JWT\Auth\Guards;

use Carbon\Carbon;
use Tymon\JWTAuth\JWT;
Expand Down
14 changes: 7 additions & 7 deletions src/Http/Middleware/JWTRefresh.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace UniSharp\JWT\Http\Middleware;
namespace Clystnet\JWT\Http\Middleware;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
Expand All @@ -22,10 +22,11 @@ public function __construct()
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
* @throws TokenBlacklistedException
*/
public function handle($request, \Closure $next)
{
Expand Down Expand Up @@ -58,11 +59,10 @@ public function checkForToken(Request $request)
/**
* Attempt to authenticate a user via the token in the request.
*
* @param \Illuminate\Http\Request $request
*
* @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
* @param \Illuminate\Http\Request $request
*
* @return void
* @return bool|void
* @throws TokenBlacklistedException
*/
public function authenticate(Request $request)
{
Expand Down
6 changes: 3 additions & 3 deletions src/JWTServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace UniSharp\JWT;
namespace Clystnet\JWT;

use Illuminate\Support\ServiceProvider;
use UniSharp\JWT\Auth\Guards\JWTAuthGuard;
use UniSharp\JWT\Http\Middleware\JWTRefresh;
use Clystnet\JWT\Auth\Guards\JWTAuthGuard;
use Clystnet\JWT\Http\Middleware\JWTRefresh;

class JWTServiceProvider extends ServiceProvider
{
Expand Down
2 changes: 1 addition & 1 deletion tests/JWTTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Config;
use Tymon\JWTAuth\Exceptions\JWTException;
use UniSharp\JWT\Auth\Guards\JWTAuthGuard;
use Clystnet\JWT\Auth\Guards\JWTAuthGuard;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;

class JWTTest extends TestCase
Expand Down

0 comments on commit c8b3e57

Please sign in to comment.