Skip to content

Commit

Permalink
Merge pull request #6 from momospnr/update-auth0-php-v8
Browse files Browse the repository at this point in the history
update auth0-php to v8
  • Loading branch information
kuma-guy authored Nov 21, 2023
2 parents 89e46b5 + 80c40f4 commit abc0a83
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
13 changes: 10 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
}
],
"require": {
"auth0/auth0-php": "^7.0",
"auth0/auth0-php": "^8.7",
"ray/aura-web-module": "^0.1.0",
"koriym/http-constants": "^1.1",
"koriym/http-constants": "^1.2",
"josegonzalez/dotenv": "^3.2",
"ray/di": "^2.15"
"ray/di": "^2.15",
"nyholm/psr7": "^1.8",
"guzzlehttp/guzzle": "^7.7"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
Expand Down Expand Up @@ -55,5 +57,10 @@
"vendor/bin/php-cs-fixer fix -v",
"vendor/bin/phpcbf src tests"
]
},
"config": {
"allow-plugins": {
"php-http/discovery": true
}
}
}
2 changes: 1 addition & 1 deletion src/Provider/AuthenticationClientProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ public function __construct($config)

public function get() : Authentication
{
return new Authentication($this->config['domain'], $this->config['client_id'], $this->config['client_secret']);
return new Authentication($this->config);
}
}
7 changes: 4 additions & 3 deletions tests/Auth0ModuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ protected function configure() : void
{
$this->bind(Management::class)->toProvider(FakeManagementClientProvider::class);
$this->install(new Auth0Module([
'domain' => 'AUTH0_DOMAIN',
'client_id' => 'AUTH0_CLIENT_ID',
'client_secret' => 'AUTH0_CLIENT_SECRET',
'domain' => 'https://example.com',
'clientId' => 'AUTH0_CLIENT_ID',
'clientSecret' => 'AUTH0_CLIENT_SECRET',
'cookieSecret' => 'AUTH0_COOKIE_SECRET'
]));
}
};
Expand Down
10 changes: 1 addition & 9 deletions tests/Fake/Provider/FakeManagementClientProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@ public function __construct($config)

public function get() : Management
{
// $response = $this->authClient->client_credentials([
// 'audience' => 'https://' . $this->config['domain'] . '/api/v2/',
// ]);

$response = [
'access_token' => 'access_token',
'domain' => 'domain'
];
return new Management($response['access_token'], $this->config['domain']);
return new Management($this->config);
}
}

0 comments on commit abc0a83

Please sign in to comment.