diff --git a/lib/OIDC/RP/AuthenticationRequest.php b/lib/OIDC/RP/AuthenticationRequest.php index 69c4c3d..788a78a 100644 --- a/lib/OIDC/RP/AuthenticationRequest.php +++ b/lib/OIDC/RP/AuthenticationRequest.php @@ -191,7 +191,11 @@ public function getRedirectURL(string $op_issuer, string $authorization_endpoint public function send(string $op_issuer, string $authorization_endpoint, array $acr, array $user_attributes, string $code_verifier, string $nonce, string $state) { $authenticationRequestURL = $this->getRedirectURL($op_issuer, $authorization_endpoint, $acr, $user_attributes, $code_verifier, $nonce, $state); + $this->sendURL($authenticationRequestURL); + } + public function sendURL(string $authenticationRequestURL) + { // HOOK: pre_authorization_request if ($this->hooks != null) { $hooks_pre = $this->hooks['pre_authorization_request']; diff --git a/www/index.php b/www/index.php index b59987f..9be388a 100644 --- a/www/index.php +++ b/www/index.php @@ -396,7 +396,7 @@ function ($f3) { $op_issuer = $configuration->metadata->openid_provider->issuer; $authenticationRequest = new AuthenticationRequest($base, $service_name, $domain, $config, $hooks); - $authenticationRequestURL = $authenticationRequest->send( + $authenticationRequestURL = $authenticationRequest->getRedirectURL( $op_issuer, $authorization_endpoint, $acr, @@ -406,6 +406,7 @@ function ($f3) { Util::base64UrlEncode(str_pad($req_id, 32)) ); + $authenticationRequest->sendURL($authenticationRequestURL); $logger->log('spid-cie-oidc-php', 'GET /oidc/rp/authz/' . $ta_id . '/' . $op_id, $_GET, 'redirect to ' . $authenticationRequestURL); } );