Skip to content

Commit

Permalink
Fix #1141: Use operation claim endpoint instead of operation detail (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
romanstrobl authored Nov 21, 2024
1 parent bd3404c commit 3cb9073
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions docs/PowerAuth-Enrollment-Server-1.10.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ The allowed values of the `environment` parameter are:
- `production` - production APNs host is used for sending push messages

For platforms other than APNs the parameter is not used, `null` value is allowed.

## Internal Changes

Operation claim now uses the new `POST /rest/v3/operation/claim` for claiming operations instead of `POST /rest/v3/operation/detail` to separate operation claim action from obtaining operation detail.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.wultra.security.powerauth.client.model.enumeration.SignatureType;
import com.wultra.security.powerauth.client.model.enumeration.UserActionResult;
import com.wultra.security.powerauth.client.model.error.PowerAuthClientException;
import com.wultra.security.powerauth.client.model.request.OperationClaimRequest;
import com.wultra.security.powerauth.client.model.request.OperationDetailRequest;
import com.wultra.security.powerauth.client.model.request.OperationFailApprovalRequest;
import com.wultra.security.powerauth.client.model.request.OperationListForUserRequest;
Expand Down Expand Up @@ -334,11 +335,11 @@ private OperationDetailResponse fetchOperationDetailInternal(@NotNull String ope
* @throws MobileTokenException When the operation is in incorrect state.
*/
private OperationDetailResponse claimOperationInternal(@NotNull String operationId, @NotNull String userId) throws PowerAuthClientException, MobileTokenException {
final OperationDetailRequest operationDetailRequest = new OperationDetailRequest();
operationDetailRequest.setOperationId(operationId);
operationDetailRequest.setUserId(userId);
final OperationDetailResponse operationDetail = powerAuthClient.operationDetail(
operationDetailRequest,
final OperationClaimRequest operationClaimRequest = new OperationClaimRequest();
operationClaimRequest.setOperationId(operationId);
operationClaimRequest.setUserId(userId);
final OperationDetailResponse operationDetail = powerAuthClient.operationClaim(
operationClaimRequest,
httpCustomizationService.getQueryParams(),
httpCustomizationService.getHttpHeaders()
);
Expand Down

0 comments on commit 3cb9073

Please sign in to comment.