diff --git a/features/request/RequestContext.php b/features/request/RequestContext.php index 1d3a261..c11da2b 100644 --- a/features/request/RequestContext.php +++ b/features/request/RequestContext.php @@ -557,6 +557,7 @@ public function iCallMfaVerifyRegistration() $this->requestData['value'], $this->rpOrigin, 'registration', + $this->requestData['label'], ); } } diff --git a/features/request/request.feature b/features/request/request.feature index d93559f..ffb3c5c 100644 --- a/features/request/request.feature +++ b/features/request/request.feature @@ -430,6 +430,7 @@ Feature: Formatting requests for sending to the ID Broker API And I provide an "id" of "789" And I provide an "employee_id" of "123" And I provide a "value" of "01234987" + And I provide a "label" of "Yubikey" When I call mfaVerifyRegistration Then the method should be "POST" And the url should be 'https://api.example.com/mfa/789/verify/registration?rpOrigin=https%3A%2F%2Flogin.example.com' @@ -438,6 +439,7 @@ Feature: Formatting requests for sending to the ID Broker API """ { "employee_id": "123", - "value": "01234987" + "value": "01234987", + "label": "Yubikey" } """ diff --git a/src/IdBrokerClient.php b/src/IdBrokerClient.php index a792bea..0460ac7 100644 --- a/src/IdBrokerClient.php +++ b/src/IdBrokerClient.php @@ -461,8 +461,14 @@ public function mfaUpdateWebauthn(string $id, string $employeeId, string $label, * @throws MfaRateLimitException * @throws ServiceException */ - public function mfaVerify(string $id, string $employeeId, $value, string $rpOrigin = '', string $type = '') - { + public function mfaVerify( + string $id, + string $employeeId, + $value, + string $rpOrigin = '', + string $type = '', + string $label = '' + ) { $config = [ 'id' => $id, 'employee_id' => $employeeId, @@ -471,6 +477,9 @@ public function mfaVerify(string $id, string $employeeId, $value, string $rpOrig ]; if ($type != '') { + if ( !empty($label)) { + $config['label'] = $label; + } $result = $this->mfaVerifyRegistrationInternal($config); } else { $result = $this->mfaVerifyInternal($config); diff --git a/src/descriptions/id-broker-api.php b/src/descriptions/id-broker-api.php index c8137f8..838a95d 100644 --- a/src/descriptions/id-broker-api.php +++ b/src/descriptions/id-broker-api.php @@ -348,6 +348,11 @@ 'type' => [ 'string', 'object' ], 'location' => 'json', ], + 'label' => [ + 'required' => false, + 'type' => 'string', + 'location' => 'json', + ], 'rpOrigin' => [ 'required' => false, 'type' => 'string',