Skip to content

Commit

Permalink
fix: AuthenticationRequest log
Browse files Browse the repository at this point in the history
  • Loading branch information
damikael committed Jun 20, 2024
1 parent 7ba3471 commit 9bd388a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/OIDC/RP/AuthenticationRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down
3 changes: 2 additions & 1 deletion www/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
}
);
Expand Down

0 comments on commit 9bd388a

Please sign in to comment.