fix app namespace and update comments
This commit is contained in:
@@ -12,15 +12,24 @@ Authenticate WordPress user via json web token from Laravel Application.
|
||||
## Usage
|
||||
|
||||
Send users to:
|
||||
https://your-wp-site.com/dabestaniha/login?laravel_login_token=TOKEN
|
||||
https://your-wp-site.com/dabestaniha/login/?token=TOKEN
|
||||
|
||||
With required data encoded in the token.
|
||||
|
||||
Payload JWT:
|
||||
```json
|
||||
{
|
||||
"email": "user@example.com",
|
||||
"name": "Test User",
|
||||
"exp": 1752575400
|
||||
"iat" : 1752671371,
|
||||
"jti" : "---qwe---",
|
||||
"iss" : "https://api.test",
|
||||
"exp" : 1763039371,
|
||||
"aud" : "https://api.test",
|
||||
"data" : {
|
||||
"id" : 1,
|
||||
"name" : "Test User",
|
||||
"mobile" : "9123456789",
|
||||
"email" : "user@gmail.com",
|
||||
"username" : "test-user"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -6,6 +6,7 @@
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Dabestaniha\\AuthenticateBridge\\App\\": "src/app/",
|
||||
"Dabestaniha\\AuthenticateBridge\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
|
||||
@@ -38,7 +38,6 @@ add_action('init', function () {
|
||||
|
||||
require_once 'settings-page.php';
|
||||
|
||||
// $jwt_secret = get_configured_option('jwt-secret');
|
||||
function decrypt_jwt_token(string $token): array
|
||||
{
|
||||
$jwt_secret = get_configured_option('jwt-secret');
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Dabestaniha\AuthenticateBridge\App\Http\Requests;
|
||||
|
||||
use Dabestaniha\AuthenticateBridge\Support\Collection;
|
||||
use Dabestaniha\AuthenticateBridge\App\Support\Collection;
|
||||
|
||||
abstract class BaseFormRequest
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Dabestaniha\AuthenticateBridge\Support;
|
||||
namespace Dabestaniha\AuthenticateBridge\App\Support;
|
||||
|
||||
class Collection
|
||||
{
|
||||
Vendored
+1
@@ -7,5 +7,6 @@ $baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'),
|
||||
'Dabestaniha\\AuthenticateBridge\\App\\' => array($baseDir . '/src/app'),
|
||||
'Dabestaniha\\AuthenticateBridge\\' => array($baseDir . '/src'),
|
||||
);
|
||||
|
||||
Vendored
+5
@@ -17,6 +17,7 @@ class ComposerStaticInit1e84672d5963a78cf9ba3e25dc66cf6f
|
||||
),
|
||||
'D' =>
|
||||
array (
|
||||
'Dabestaniha\\AuthenticateBridge\\App\\' => 35,
|
||||
'Dabestaniha\\AuthenticateBridge\\' => 31,
|
||||
),
|
||||
);
|
||||
@@ -26,6 +27,10 @@ class ComposerStaticInit1e84672d5963a78cf9ba3e25dc66cf6f
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/firebase/php-jwt/src',
|
||||
),
|
||||
'Dabestaniha\\AuthenticateBridge\\App\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/src/app',
|
||||
),
|
||||
'Dabestaniha\\AuthenticateBridge\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/src',
|
||||
|
||||
Vendored
+2
-2
@@ -3,7 +3,7 @@
|
||||
'name' => 'dabestaniha/authenticate-bridge',
|
||||
'pretty_version' => 'dev-main',
|
||||
'version' => 'dev-main',
|
||||
'reference' => 'cb290223110f8d491dec9421621972ae82ef79df',
|
||||
'reference' => '89a7eed84730a7731c7c74cfba53878925b4ccbe',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@@ -13,7 +13,7 @@
|
||||
'dabestaniha/authenticate-bridge' => array(
|
||||
'pretty_version' => 'dev-main',
|
||||
'version' => 'dev-main',
|
||||
'reference' => 'cb290223110f8d491dec9421621972ae82ef79df',
|
||||
'reference' => '89a7eed84730a7731c7c74cfba53878925b4ccbe',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
|
||||
Reference in New Issue
Block a user