diff --git a/src/PIResponse.php b/src/PIResponse.php index b0fcc5d15b3c83149388c1db7c6da9257aa8a843..ff586ae1c23b7447851e43b86343ccc48bb32166 100644 --- a/src/PIResponse.php +++ b/src/PIResponse.php @@ -109,11 +109,13 @@ class PIResponse // Check that the authentication status is one of the allowed ones $r = (!empty($map['result']['authentication'])) ? $map['result']['authentication'] : null; - if (in_array( - $r, - [AuthenticationStatus::CHALLENGE, AuthenticationStatus::ACCEPT, AuthenticationStatus::REJECT], - true - )) { + if ( + in_array( + $r, + [AuthenticationStatus::CHALLENGE, AuthenticationStatus::ACCEPT, AuthenticationStatus::REJECT], + true + ) + ) { $ret->authenticationStatus = $r; } else { $privacyIDEA->debugLog('Unknown authentication status'); diff --git a/src/PrivacyIDEA.php b/src/PrivacyIDEA.php index 62bfaf0fe83361b571255bc914ab85dc7e9066fe..170c4a0d574872939cafdbf560b2cc734dd7037d 100644 --- a/src/PrivacyIDEA.php +++ b/src/PrivacyIDEA.php @@ -53,17 +53,20 @@ class PrivacyIDEA public $timeout; /** - * @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 = ''; /** - * @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 = ''; /** - * @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 = ''; @@ -88,8 +91,10 @@ class PrivacyIDEA * Try to authenticate the user with the /validate/check endpoint. * * @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 null $transactionID Optional transaction ID. Used to reference a challenge that was triggered beforehand. + * @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 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 */ @@ -198,8 +203,7 @@ class PrivacyIDEA $genkey, $type, $description = '' - ) // No return type because mixed not allowed yet - { + ) { // No return type because mixed not allowed yet assert(gettype($username) === 'string'); assert(gettype($type) === 'string'); assert(gettype($genkey) === 'string'); @@ -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 * 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 */ public function getAuthToken() {