* @var string Account name for a service account to the privacyIDEA server. This is required to use the /validate/triggerchallenge endpoint.
* @var string Account name for a service account to the privacyIDEA server.
* This is required to use the /validate/triggerchallenge endpoint.
*/
*/
public$serviceAccountName='';
public$serviceAccountName='';
/**
/**
* @var string Password for a service account to the privacyIDEA server. This is required to use the /validate/triggerchallenge endpoint.
* @var string Password for a service account to the privacyIDEA server.
* This is required to use the /validate/triggerchallenge endpoint.
*/
*/
public$serviceAccountPass='';
public$serviceAccountPass='';
/**
/**
* @var string Realm for a service account to the privacyIDEA server. This is required to use the /validate/triggerchallenge endpoint. This is optional.
* @var string Realm for a service account to the privacyIDEA server.
* This is required to use the /validate/triggerchallenge endpoint. This is optional.
*/
*/
public$serviceAccountRealm='';
public$serviceAccountRealm='';
...
@@ -88,8 +91,10 @@ class PrivacyIDEA
...
@@ -88,8 +91,10 @@ class PrivacyIDEA
* Try to authenticate the user with the /validate/check endpoint.
* Try to authenticate the user with the /validate/check endpoint.
*
*
* @param string $username
* @param string $username
* @param string $pass this can be the OTP, but also the PIN to trigger a token or PIN+OTP depending on the configuration of the server
* @param string $pass this can be the OTP, but also the PIN to trigger
* @param null $transactionID Optional transaction ID. Used to reference a challenge that was triggered beforehand.
* a token or PIN+OTP depending on the configuration of the server
* @param null $transactionID Optional transaction ID. Used to reference
* a challenge that was triggered beforehand.
*
*
* @return PIResponse|null null if response was empty or malformed, or parameter missing
* @return PIResponse|null null if response was empty or malformed, or parameter missing
*/
*/
...
@@ -198,8 +203,7 @@ class PrivacyIDEA
...
@@ -198,8 +203,7 @@ class PrivacyIDEA
$genkey,
$genkey,
$type,
$type,
$description=''
$description=''
)// No return type because mixed not allowed yet
){// No return type because mixed not allowed yet
{
assert(gettype($username)==='string');
assert(gettype($username)==='string');
assert(gettype($type)==='string');
assert(gettype($type)==='string');
assert(gettype($genkey)==='string');
assert(gettype($genkey)==='string');
...
@@ -349,7 +353,8 @@ class PrivacyIDEA
...
@@ -349,7 +353,8 @@ class PrivacyIDEA
* Retrieves an auth token from the server using the service account. An auth token is required for some requests to
* Retrieves an auth token from the server using the service account. An auth token is required for some requests to
* privacyIDEA.
* privacyIDEA.
*
*
* @return string the auth token or empty string if the response did not contain a token or no service account is configured
* @return string the auth token or empty string if the response
* did not contain a token or no service account is configured