Skip to content

Commit

Permalink
migration to new owner changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dersonsena committed Dec 24, 2023
1 parent a077345 commit 62edaac
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ If all ok, at this point you're able to authenticate with a valid JWT Token.
You can use the [JWTTools](./src/JWTTools.php) methods to make specific things in your project. See some examples below:

```php
use Dersonsena\JWTTools\JWTTools;
use AstrotechLabs\JWTTools\JWTTools;

$jwtTools = JWTTools::build('my-secret-key');

Expand Down Expand Up @@ -222,7 +222,7 @@ Array
You can insert the active record attributes in your payload using `withModel()` method, like this:

```php
use Dersonsena\JWTTools\JWTTools;
use AstrotechLabs\JWTTools\JWTTools;

$user = app\models\User::findOne(2);

Expand Down Expand Up @@ -258,7 +258,7 @@ The `sub` property is automatically override to `$model->getPrimaryKey()` value,
You can change the JWT Properties (such as `iss`, `aud` etc) adding an array in second method parameter, as below:

```php
use Dersonsena\JWTTools\JWTTools;
use AstrotechLabs\JWTTools\JWTTools;

$payload = JWTTools::build('my-secret-key', [
'algorithm' => 'ES256',
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "dersonsena/yii2-jwt-tools",
"name": "astrotechlabs/yii2-jwt-tools",
"type": "yii2-extension",
"description": "An easy way to configure JWT authentication and validation on Yii Framework 2 Projects",
"license": "MIT",
Expand All @@ -21,13 +21,14 @@
"authors": [
{
"name": "Kilderson Sena",
"email": "dersonsena@gmail.com",
"email": "kilderson@astrotech.solutions",
"role": "Developer"
}
],
"autoload": {
"psr-4": {
"Dersonsena\\JWTTools\\": "src"
"DersonSena\\JWTTools\\": "src",
"AstrotechLabs\\JWTTools\\": "src"
}
},
"autoload-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/JWTPayload.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Dersonsena\JWTTools;
namespace AstrotechLabs\JWTTools;

use DateInterval;
use DateTime;
Expand Down
4 changes: 2 additions & 2 deletions src/JWTSignatureBehavior.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Dersonsena\JWTTools;
namespace AstrotechLabs\JWTTools;

use Dersonsena\JWTTools\JWTTools;
use AstrotechLabs\JWTTools\JWTTools;
use Yii;
use yii\base\ActionFilter;
use yii\web\UnauthorizedHttpException;
Expand Down
4 changes: 2 additions & 2 deletions src/JWTTools.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Dersonsena\JWTTools;
namespace AstrotechLabs\JWTTools;

use DateInterval;
use DateTime;
Expand Down Expand Up @@ -119,7 +119,7 @@ public function withData($data = []): self
}
return $this;
}

public function getJWT(): string
{
try {
Expand Down
2 changes: 1 addition & 1 deletion tests/JWTPayloadTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use Dersonsena\JWTTools\JWTPayload;
use AstrotechLabs\JWTTools\JWTPayload;
use PHPUnit\Framework\TestCase;

class JWTPayloadTest extends TestCase
Expand Down
2 changes: 1 addition & 1 deletion tests/JWTToolsTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use Dersonsena\JWTTools\JWTTools;
use AstrotechLabs\JWTTools\JWTTools;
use Firebase\JWT\ExpiredException;
use PHPUnit\Framework\TestCase;
use yii\db\ActiveRecord;
Expand Down

0 comments on commit 62edaac

Please # to comment.