2 files + 11 − 5 Inline Compare changes Side-by-side Inline Show whitespace changes Files 2 public_html/example/testapp/classes/mfa-ensure.php +5 −2 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ /** * mfa-ensure.php * * @author Axel Hahn <axel.hahn@unibe> * @author Axel Hahn <axel.hahn@unibe.ch> * */ Loading @@ -11,6 +11,9 @@ $mfa = new mfaclient(); $mfa->debug($aConfig['debug']??false); // if user was not set in config, set it manually // $mfa->setUser(<your-function-to-fetch-userid>); $iHttpStatus=$mfa->ensure(); // mfa was skipped? Enable this line to see the reason Loading public_html/example/testapp/classes/mfaclient.class.php +6 −3 Original line number Diff line number Diff line Loading @@ -12,11 +12,12 @@ * * 2025-06-11 <axel.hahn@unibe.ch> initial version * 2025-06-30 <axel.hahn@unibe.ch> set version 1.0.1 in user agenmt in http requests * 2025-07-07 <axel.hahn@unibe.ch> 1.0.2 handle executed setUser() before ensure() */ class mfaclient { protected string $_sVersion = "1.0.1"; protected string $_sVersion = "1.0.2"; protected array $aConfig = []; // protected string $sSessionvarname = "mfaclient"; Loading Loading @@ -382,12 +383,14 @@ class mfaclient $this->logout(); } $aVerify=$this->aConfig; $aVerify['user']=$this->sUser ?: ($this->aConfig['user'] ?? null); foreach(['api', 'appid', 'shared_secret', 'user'] as $sKey){ if(!isset($this->aConfig[$sKey])){ if(!isset($aVerify[$sKey])){ $this->aStatus[] = "Skip: Key '$sKey' was not set in config."; return 200; } if(!$this->aConfig[$sKey]){ if(!$aVerify[$sKey]){ $this->aStatus[] = "Skip: Key '$sKey' is empty in config."; return 200; } Loading
public_html/example/testapp/classes/mfa-ensure.php +5 −2 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ /** * mfa-ensure.php * * @author Axel Hahn <axel.hahn@unibe> * @author Axel Hahn <axel.hahn@unibe.ch> * */ Loading @@ -11,6 +11,9 @@ $mfa = new mfaclient(); $mfa->debug($aConfig['debug']??false); // if user was not set in config, set it manually // $mfa->setUser(<your-function-to-fetch-userid>); $iHttpStatus=$mfa->ensure(); // mfa was skipped? Enable this line to see the reason Loading
public_html/example/testapp/classes/mfaclient.class.php +6 −3 Original line number Diff line number Diff line Loading @@ -12,11 +12,12 @@ * * 2025-06-11 <axel.hahn@unibe.ch> initial version * 2025-06-30 <axel.hahn@unibe.ch> set version 1.0.1 in user agenmt in http requests * 2025-07-07 <axel.hahn@unibe.ch> 1.0.2 handle executed setUser() before ensure() */ class mfaclient { protected string $_sVersion = "1.0.1"; protected string $_sVersion = "1.0.2"; protected array $aConfig = []; // protected string $sSessionvarname = "mfaclient"; Loading Loading @@ -382,12 +383,14 @@ class mfaclient $this->logout(); } $aVerify=$this->aConfig; $aVerify['user']=$this->sUser ?: ($this->aConfig['user'] ?? null); foreach(['api', 'appid', 'shared_secret', 'user'] as $sKey){ if(!isset($this->aConfig[$sKey])){ if(!isset($aVerify[$sKey])){ $this->aStatus[] = "Skip: Key '$sKey' was not set in config."; return 200; } if(!$this->aConfig[$sKey]){ if(!$aVerify[$sKey]){ $this->aStatus[] = "Skip: Key '$sKey' is empty in config."; return 200; } Loading