Skip to content
Snippets Groups Projects
Commit b986c1f0 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

update docs

parent bdb3d5f3
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,24 @@ The generated button is a form with hidden fields. Clicking on the button sends
* Go back and reload the page to generate a new button. That one can be clicked.
* If it still does not work the clock on your application server or mfa server could be out of sync.
### No MFA appears
You didn't get any mfa message, no error and mfa seems to be skipped completely?
In the `mfa-ensure.php` enable the last line or put it into your code:
```php
echo $mfa->showStatus();
```
It will show you if a user still has a valid session aftrer a successful challenge or an error was detected like
* one of the keys is missing or empty in the config:
* 'api'
* 'appid'
* 'shared_secret'
* 'user'
### Debugging
There is a debug mode if you want to dive deeper when a behaviour is not like expected.
......
## 📦 Class \mfaclient
```txt
/**
*
* MFA CLIENT CLASS
*
* Connect a web app with MFA server
*
* Source: https://git-repo.iml.unibe.ch/iml-open-source/
* Docs: https://os-docs.iml.unibe.ch/mfa-client/index.html
* License: GNU GPL 3.0
*
*/
```
## 🔶 Properties
......@@ -16,12 +26,11 @@ Intialize mfa client - optional set config and user@see setConfig@see setUser
**Return**: ``
**Parameters**: **2**
**Parameters**: **1**
| Parameter | Type | Description
|-- |-- |--
| \<optional\> $aConfig | `array` | optional: configuration with app id and base url
| \<optional\> $sUser | `string` | optional: user id that was logged in
### 🔹 public check()
......@@ -75,6 +84,24 @@ Get IP of current client (to be sent to MFA server)
**Parameters**: **0**
### 🔹 public getConfig()
return current config
**Return**: `array`
**Parameters**: **0**
### 🔹 public getStatus()
return current status
**Return**: `array`
**Parameters**: **0**
### 🔹 public getUrls()
get list of urls from MFA server
......@@ -155,5 +182,18 @@ Show html message and abort to prevent visibility of the app without solved mfa
| \<required\> $iHttpStatus | `int` | http statuscode to set
| \<required\> $sHtmlcode | `string` | http body to show
### 🔹 public showStatus()
show current status if you want to find out why mfa was skipped@example
```txt echo $mfa->showStatus();```
**Return**: `string`
**Parameters**: **0**
---
Generated with Axels PHP class doc parser.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment