Skip to content

Commit

Permalink
Merge pull request #2616 from phili67/phili67-composer-jwt-update
Browse files Browse the repository at this point in the history
jimtools/jwt-auth update
  • Loading branch information
phili67 committed Apr 17, 2024
2 parents 61b0878 + efda10c commit b080725
Show file tree
Hide file tree
Showing 3 changed files with 176 additions and 173 deletions.
8 changes: 3 additions & 5 deletions src/api/index.php
Expand Up @@ -10,10 +10,8 @@
use Slim\Middleware\ContentLengthMiddleware;
use DI\Container;

use Firebase\JWT\JWT;
use Firebase\JWT\Key;

use EcclesiaCRM\Slim\Middleware\VersionMiddleware;
use Tuupola\Middleware\JwtAuthentication;

use EcclesiaCRM\SessionUser;
use EcclesiaCRM\PluginQuery;
Expand Down Expand Up @@ -48,7 +46,7 @@

$app->add( new VersionMiddleware() );

$app->add(new Tuupola\Middleware\JwtAuthentication([
$app->add(new JwtAuthentication([
"secret" => SessionUser::getUser()->getJwtSecretForApi(),
//"cookie" => SessionUser::getUser()->getUserNameForApi(),
"ignore" => [SystemURLs::getRootPath()."/api/families", SystemURLs::getRootPath(). "/api/persons/", SystemURLs::getRootPath()."/api/system/csp-report",
Expand Down Expand Up @@ -138,7 +136,7 @@
// fundraiser route
require_once __DIR__.'/routes/fundraiser/fundraiser.php';

// we load the plugin
// we load the plugins
if (SessionUser::getCurrentPageName() == 'v2/dashboard') {
// only dashboard plugins are loaded on the maindashboard page
$plugins = PluginQuery::create()
Expand Down
2 changes: 1 addition & 1 deletion src/composer.json
Expand Up @@ -58,7 +58,7 @@
"php-di/php-di": "^6.3",
"tecnickcom/tcpdf": "^6.4",
"robthree/twofactorauth": "^1.8",
"tuupola/slim-jwt-auth": "^3.8"
"jimtools/jwt-auth": "^1.0"
},
"autoload": {
"classmap": [
Expand Down

0 comments on commit b080725

Please sign in to comment.