Skip to content
Snippets Groups Projects
Commit 6846697a authored by Pierre Fleutot's avatar Pierre Fleutot
Browse files

Fix chemin vers clé publique dans méthode get jwks (obtention certificat json)

parent 7eca6e21
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ league_oauth2_server: ...@@ -3,7 +3,7 @@ league_oauth2_server:
# Full path to the private key file. # Full path to the private key file.
# How to generate a private key: https://oauth2.thephpleague.com/installation/#generating-public-and-private-keys # How to generate a private key: https://oauth2.thephpleague.com/installation/#generating-public-and-private-keys
private_key: '%env(resolve:OAUTH_PRIVATE_KEY)%' private_key: '%kernel.project_dir%%env(resolve:OAUTH_PRIVATE_KEY)%'
# Passphrase of the private key, if any # Passphrase of the private key, if any
private_key_passphrase: '%env(OAUTH_PASSPHRASE)%' private_key_passphrase: '%env(OAUTH_PASSPHRASE)%'
...@@ -49,7 +49,7 @@ league_oauth2_server: ...@@ -49,7 +49,7 @@ league_oauth2_server:
# Full path to the public key file # Full path to the public key file
# How to generate a public key: https://oauth2.thephpleague.com/installation/#generating-public-and-private-keys # How to generate a public key: https://oauth2.thephpleague.com/installation/#generating-public-and-private-keys
public_key: '%env(resolve:OAUTH_PUBLIC_KEY)%' public_key: '%kernel.project_dir%%env(resolve:OAUTH_PUBLIC_KEY)%'
scopes: scopes:
# Scopes that you wish to utilize in your application. # Scopes that you wish to utilize in your application.
......
...@@ -44,7 +44,7 @@ class IndexController extends AbstractController ...@@ -44,7 +44,7 @@ class IndexController extends AbstractController
{ {
// Load the public key from the filesystem and use OpenSSL to parse it. // Load the public key from the filesystem and use OpenSSL to parse it.
$kernelDirectory = $this->getParameter('kernel.project_dir'); $kernelDirectory = $this->getParameter('kernel.project_dir');
$publicKey = openssl_pkey_get_public(file_get_contents($kernelDirectory . '/var/keys/public.key')); $publicKey = openssl_pkey_get_public(file_get_contents($kernelDirectory . $_ENV['OAUTH_PUBLIC_KEY']));
$details = openssl_pkey_get_details($publicKey); $details = openssl_pkey_get_details($publicKey);
$jwks = [ $jwks = [
'keys' => [ 'keys' => [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment