Skip to content

Commit

Permalink
getProxy method can work without any dummy db operation.
Browse files Browse the repository at this point in the history
  • Loading branch information
msyk committed Jun 23, 2024
1 parent c84aa35 commit 1759b79
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
5 changes: 2 additions & 3 deletions samples/Auth_Support/User_Enrollment/confirm.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,16 @@ public function getTargetUserId(string $password): ?string
"records" => 1,
],
];
$this->dbInit($dSource, [], ["db-class" => "PDO"], 2);
$this->dbRead('mailtemplate'); // Dummy read for setting up the Proxy object.

$proxy = $this->getExtProxy();
$this->dbInit($dSource, [], ["db-class" => "PDO"], 2);
$result = $proxy->userEnrollmentActivateUser($_GET['c'], $password, 'initialPassword');
return $result;
}

public function updateUserRecord(string $userId): void
{
$this->dbRead('authuser', ["id" => $userId]);
// For additional processing after creating user record.
}
}

Expand Down
4 changes: 4 additions & 0 deletions spec/Manual-Tests/SAML-Test.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ which just have test accounts. After someone tests the SAML features, the result

The format of below is: [commit code from git log], [Version from composer.json], [Checker name], [Result]

- commit 1f0eca34f4e4e859a5533cf3a7c9a3306f0903f0 (Wed Jun 19 12:19:35 2024 +0900),
INTER-Mediator Ver.13(2024-04-26) with SimpleSAMLphp Ver.2.2.2,
by Masayuki Nii(2024-06-22 11:00), OK

- commit d1f52043b2670c518c7bd5c81e9997d5007afbc8 (Fri May 3 09:20:41 2024 +0900),
INTER-Mediator Ver.13(2024-04-26) with SimpleSAMLphp Ver.2.2.2,
by Masayuki Nii(2024-05-03 12:30), OK
Expand Down
3 changes: 2 additions & 1 deletion src/php/DB/Proxy_ExtSupport.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ trait Proxy_ExtSupport
public function getExtProxy(): ?Proxy
{
if(!$this->extProxy){
throw new Exception("The proxy object doesn't instanciate so far.");
$this->dbInit();
$this->initializeSpec("", null);
}
return $this->extProxy;
}
Expand Down
2 changes: 1 addition & 1 deletion src/php/DB/Support/DB_Auth_Handler_FileMaker_DataAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ public function authSupportUserEnrollmentEnrollingUser(string $hash): ?string
}
$this->fmdb->setupFMDataAPIforAuth($hashTable, 1);
$conditions = array(
array('hasu' => $hash, 'clienthost' => '=', 'expired' => IMUtil::currentDTStringFMS(3600) . '...')
array('hash' => $hash, 'clienthost' => '=', 'expired' => IMUtil::currentDTStringFMS(3600) . '...')
);
$result = null; // For PHPStan level 1
try {
Expand Down

0 comments on commit 1759b79

Please sign in to comment.