From 775b975298bc1a61f084102734df3354c58a12c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 01:24:36 +0000 Subject: [PATCH 01/19] Bump bcprov-jdk18on.version from 1.77 to 1.78 Bumps `bcprov-jdk18on.version` from 1.77 to 1.78. Updates `org.bouncycastle:bcprov-jdk18on` from 1.77 to 1.78 - [Changelog](https://github.com/bcgit/bc-java/blob/main/docs/releasenotes.html) - [Commits](https://github.com/bcgit/bc-java/commits) Updates `org.bouncycastle:bcpkix-jdk18on` from 1.77 to 1.78 - [Changelog](https://github.com/bcgit/bc-java/blob/main/docs/releasenotes.html) - [Commits](https://github.com/bcgit/bc-java/commits) --- updated-dependencies: - dependency-name: org.bouncycastle:bcprov-jdk18on dependency-type: direct:development update-type: version-update:semver-minor - dependency-name: org.bouncycastle:bcpkix-jdk18on dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 856d502a8..01ea21527 100644 --- a/pom.xml +++ b/pom.xml @@ -91,7 +91,7 @@ UTF-8 17 17 - 1.77 + 1.78 3.5.3 1.6.4 From 5a8aa6e0274748b9f49ac61de60997095aec799b Mon Sep 17 00:00:00 2001 From: Lubos Racansky Date: Wed, 10 Apr 2024 09:32:37 +0200 Subject: [PATCH 02/19] Fix #1582: Set develop version to 1.8.0-SNAPSHOT --- pom.xml | 10 +++++----- powerauth-data-adapter-client/pom.xml | 2 +- powerauth-data-adapter-model/pom.xml | 2 +- powerauth-mtoken-model/pom.xml | 2 +- powerauth-nextstep-client/pom.xml | 2 +- powerauth-nextstep-model/pom.xml | 2 +- powerauth-nextstep/pom.xml | 2 +- powerauth-tpp-engine-client/pom.xml | 2 +- powerauth-tpp-engine-model/pom.xml | 2 +- powerauth-tpp-engine/pom.xml | 2 +- powerauth-webflow-authentication-approval-sca/pom.xml | 2 +- powerauth-webflow-authentication-consent/pom.xml | 2 +- powerauth-webflow-authentication-form/pom.xml | 2 +- powerauth-webflow-authentication-init/pom.xml | 2 +- powerauth-webflow-authentication-login-sca/pom.xml | 2 +- powerauth-webflow-authentication-mtoken/pom.xml | 2 +- .../pom.xml | 2 +- powerauth-webflow-authentication-sms/pom.xml | 2 +- powerauth-webflow-authentication/pom.xml | 2 +- powerauth-webflow-client/pom.xml | 2 +- powerauth-webflow-i18n/pom.xml | 2 +- powerauth-webflow-resources/pom.xml | 2 +- powerauth-webflow/pom.xml | 2 +- 23 files changed, 27 insertions(+), 27 deletions(-) diff --git a/pom.xml b/pom.xml index aab2fb797..8685c2185 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ io.getlime.security powerauth-webflow-parent - 1.7.0 + 1.8.0-SNAPSHOT pom @@ -104,10 +104,10 @@ 7.4 - 1.9.0 - 1.7.0 - 1.7.0 - 1.7.0 + 1.10.0-SNAPSHOT + 1.8.0-SNAPSHOT + 1.8.0-SNAPSHOT + 1.8.0-SNAPSHOT diff --git a/powerauth-data-adapter-client/pom.xml b/powerauth-data-adapter-client/pom.xml index 15d55bbfb..d6ebcdaf1 100644 --- a/powerauth-data-adapter-client/pom.xml +++ b/powerauth-data-adapter-client/pom.xml @@ -28,7 +28,7 @@ powerauth-webflow-parent io.getlime.security - 1.7.0 + 1.8.0-SNAPSHOT diff --git a/powerauth-data-adapter-model/pom.xml b/powerauth-data-adapter-model/pom.xml index 722c14d5a..ebf3e21b4 100644 --- a/powerauth-data-adapter-model/pom.xml +++ b/powerauth-data-adapter-model/pom.xml @@ -28,7 +28,7 @@ powerauth-webflow-parent io.getlime.security - 1.7.0 + 1.8.0-SNAPSHOT diff --git a/powerauth-mtoken-model/pom.xml b/powerauth-mtoken-model/pom.xml index e3f2e3f7b..ad001d75e 100644 --- a/powerauth-mtoken-model/pom.xml +++ b/powerauth-mtoken-model/pom.xml @@ -27,7 +27,7 @@ powerauth-webflow-parent io.getlime.security - 1.7.0 + 1.8.0-SNAPSHOT diff --git a/powerauth-nextstep-client/pom.xml b/powerauth-nextstep-client/pom.xml index 7484c9312..9d414bc2a 100644 --- a/powerauth-nextstep-client/pom.xml +++ b/powerauth-nextstep-client/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.7.0 + 1.8.0-SNAPSHOT powerauth-nextstep-client diff --git a/powerauth-nextstep-model/pom.xml b/powerauth-nextstep-model/pom.xml index dd1742ad6..f07694a12 100644 --- a/powerauth-nextstep-model/pom.xml +++ b/powerauth-nextstep-model/pom.xml @@ -29,7 +29,7 @@ io.getlime.security powerauth-webflow-parent - 1.7.0 + 1.8.0-SNAPSHOT diff --git a/powerauth-nextstep/pom.xml b/powerauth-nextstep/pom.xml index 25d1051ef..0b45ed31e 100644 --- a/powerauth-nextstep/pom.xml +++ b/powerauth-nextstep/pom.xml @@ -28,7 +28,7 @@ io.getlime.security powerauth-webflow-parent - 1.7.0 + 1.8.0-SNAPSHOT diff --git a/powerauth-tpp-engine-client/pom.xml b/powerauth-tpp-engine-client/pom.xml index b0a837ae2..cbc605ba6 100644 --- a/powerauth-tpp-engine-client/pom.xml +++ b/powerauth-tpp-engine-client/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.7.0 + 1.8.0-SNAPSHOT powerauth-tpp-engine-client diff --git a/powerauth-tpp-engine-model/pom.xml b/powerauth-tpp-engine-model/pom.xml index 1d9479a6a..f1ef50cb5 100644 --- a/powerauth-tpp-engine-model/pom.xml +++ b/powerauth-tpp-engine-model/pom.xml @@ -24,7 +24,7 @@ powerauth-webflow-parent io.getlime.security - 1.7.0 + 1.8.0-SNAPSHOT powerauth-tpp-engine-model diff --git a/powerauth-tpp-engine/pom.xml b/powerauth-tpp-engine/pom.xml index f1a29dee6..f783dda13 100644 --- a/powerauth-tpp-engine/pom.xml +++ b/powerauth-tpp-engine/pom.xml @@ -28,7 +28,7 @@ io.getlime.security powerauth-webflow-parent - 1.7.0 + 1.8.0-SNAPSHOT diff --git a/powerauth-webflow-authentication-approval-sca/pom.xml b/powerauth-webflow-authentication-approval-sca/pom.xml index fd298e3d5..fb211dc91 100644 --- a/powerauth-webflow-authentication-approval-sca/pom.xml +++ b/powerauth-webflow-authentication-approval-sca/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.7.0 + 1.8.0-SNAPSHOT powerauth-webflow-authentication-approval-sca diff --git a/powerauth-webflow-authentication-consent/pom.xml b/powerauth-webflow-authentication-consent/pom.xml index 8c60a7d4f..5949f36e4 100644 --- a/powerauth-webflow-authentication-consent/pom.xml +++ b/powerauth-webflow-authentication-consent/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.7.0 + 1.8.0-SNAPSHOT powerauth-webflow-authentication-consent diff --git a/powerauth-webflow-authentication-form/pom.xml b/powerauth-webflow-authentication-form/pom.xml index 221dfbd35..b06301dda 100644 --- a/powerauth-webflow-authentication-form/pom.xml +++ b/powerauth-webflow-authentication-form/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.7.0 + 1.8.0-SNAPSHOT powerauth-webflow-authentication-form diff --git a/powerauth-webflow-authentication-init/pom.xml b/powerauth-webflow-authentication-init/pom.xml index edee55a98..0ca29bfe6 100644 --- a/powerauth-webflow-authentication-init/pom.xml +++ b/powerauth-webflow-authentication-init/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.7.0 + 1.8.0-SNAPSHOT powerauth-webflow-authentication-init diff --git a/powerauth-webflow-authentication-login-sca/pom.xml b/powerauth-webflow-authentication-login-sca/pom.xml index b46e7e2e9..8b7772d8b 100644 --- a/powerauth-webflow-authentication-login-sca/pom.xml +++ b/powerauth-webflow-authentication-login-sca/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.7.0 + 1.8.0-SNAPSHOT powerauth-webflow-authentication-login-sca diff --git a/powerauth-webflow-authentication-mtoken/pom.xml b/powerauth-webflow-authentication-mtoken/pom.xml index cd5f8b846..c23c35c6f 100644 --- a/powerauth-webflow-authentication-mtoken/pom.xml +++ b/powerauth-webflow-authentication-mtoken/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.7.0 + 1.8.0-SNAPSHOT powerauth-webflow-authentication-mtoken diff --git a/powerauth-webflow-authentication-operation-review/pom.xml b/powerauth-webflow-authentication-operation-review/pom.xml index b5152a16d..2f46b49c4 100644 --- a/powerauth-webflow-authentication-operation-review/pom.xml +++ b/powerauth-webflow-authentication-operation-review/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.7.0 + 1.8.0-SNAPSHOT powerauth-webflow-authentication-operation-review diff --git a/powerauth-webflow-authentication-sms/pom.xml b/powerauth-webflow-authentication-sms/pom.xml index 2d1336e71..5233fd20b 100644 --- a/powerauth-webflow-authentication-sms/pom.xml +++ b/powerauth-webflow-authentication-sms/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.7.0 + 1.8.0-SNAPSHOT powerauth-webflow-authentication-sms diff --git a/powerauth-webflow-authentication/pom.xml b/powerauth-webflow-authentication/pom.xml index b2446702d..98ca0e894 100644 --- a/powerauth-webflow-authentication/pom.xml +++ b/powerauth-webflow-authentication/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.7.0 + 1.8.0-SNAPSHOT io.getlime.security diff --git a/powerauth-webflow-client/pom.xml b/powerauth-webflow-client/pom.xml index 056546a0c..69cd4d819 100644 --- a/powerauth-webflow-client/pom.xml +++ b/powerauth-webflow-client/pom.xml @@ -30,7 +30,7 @@ powerauth-webflow-parent io.getlime.security - 1.7.0 + 1.8.0-SNAPSHOT diff --git a/powerauth-webflow-i18n/pom.xml b/powerauth-webflow-i18n/pom.xml index 437dcf854..6ed46bbd9 100644 --- a/powerauth-webflow-i18n/pom.xml +++ b/powerauth-webflow-i18n/pom.xml @@ -28,7 +28,7 @@ io.getlime.security powerauth-webflow-parent - 1.7.0 + 1.8.0-SNAPSHOT diff --git a/powerauth-webflow-resources/pom.xml b/powerauth-webflow-resources/pom.xml index 29d717471..3a43b206a 100644 --- a/powerauth-webflow-resources/pom.xml +++ b/powerauth-webflow-resources/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.7.0 + 1.8.0-SNAPSHOT io.getlime.security diff --git a/powerauth-webflow/pom.xml b/powerauth-webflow/pom.xml index 5f38bd1ee..f322fd844 100644 --- a/powerauth-webflow/pom.xml +++ b/powerauth-webflow/pom.xml @@ -24,7 +24,7 @@ io.getlime.security powerauth-webflow-parent - 1.7.0 + 1.8.0-SNAPSHOT powerauth-webflow From c50e39daf7c4efe09a7d558008f0fd6cfb842e51 Mon Sep 17 00:00:00 2001 From: Lubos Racansky Date: Mon, 15 Apr 2024 14:49:49 +0200 Subject: [PATCH 03/19] Disable CodeQL GitHub Action on pull requests --- .github/workflows/codeql-analysis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index b6773472f..3b49a137e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -4,9 +4,6 @@ on: workflow_dispatch: push: branches: [ 'develop', 'master', 'releases/**' ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ 'develop', 'master', 'releases/**' ] schedule: - cron: '0 2 * * 4' From afd29e6de0a1b3cb7d774295288f14acaa6d1dd2 Mon Sep 17 00:00:00 2001 From: Lubos Racansky Date: Fri, 19 Apr 2024 11:33:39 +0200 Subject: [PATCH 04/19] Fix #1627: NextStepClient API improvements - Overload methods to accept request objects as much as possible. --- .../lib/nextstep/client/NextStepClient.java | 686 +++++++++++++++++- 1 file changed, 668 insertions(+), 18 deletions(-) diff --git a/powerauth-nextstep-client/src/main/java/io/getlime/security/powerauth/lib/nextstep/client/NextStepClient.java b/powerauth-nextstep-client/src/main/java/io/getlime/security/powerauth/lib/nextstep/client/NextStepClient.java index 8dc2477b2..7d75711c7 100644 --- a/powerauth-nextstep-client/src/main/java/io/getlime/security/powerauth/lib/nextstep/client/NextStepClient.java +++ b/powerauth-nextstep-client/src/main/java/io/getlime/security/powerauth/lib/nextstep/client/NextStepClient.java @@ -100,6 +100,7 @@ public NextStepClient(RestClientConfiguration restClientConfiguration) throws Ne * @param params List of generic parameters. * @return A Response with CreateOperationResponse. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #createOperation(CreateOperationRequest) */ public ObjectResponse createOperation(@NotNull String operationName, @NotNull String operationData, List params) throws NextStepClientException { return createOperation(operationName, null, operationData, null, null, null, params, null); @@ -115,7 +116,8 @@ public ObjectResponse createOperation(@NotNull String o * @param applicationContext Context of application requesting the OAuth 2.1 consent. * @return A Response with CreateOperationResponse. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. - */ + * @see #createOperation(CreateOperationRequest) + */ public ObjectResponse createOperation(@NotNull String operationName, String operationId, @NotNull String operationData, List params, ApplicationContext applicationContext) throws NextStepClientException { return createOperation(operationName, operationId, operationData, null, null, null, params, applicationContext); } @@ -130,6 +132,7 @@ public ObjectResponse createOperation(@NotNull String o * @param applicationContext Context of application requesting the OAuth 2.1 consent. * @return A Response with CreateOperationResponse. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #createOperation(CreateOperationRequest) */ public ObjectResponse createOperation(@NotNull String operationName, @NotNull String operationData, OperationFormData formData, List params, ApplicationContext applicationContext) throws NextStepClientException { return createOperation(operationName, null, operationData, null, null, formData, params, applicationContext); @@ -148,6 +151,7 @@ public ObjectResponse createOperation(@NotNull String o * @param applicationContext Context of application requesting the OAuth 2.1 consent. * @return A Response with CreateOperationResponse. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #createOperation(CreateOperationRequest) */ public ObjectResponse createOperation(@NotNull String operationName, String operationId, @NotNull String operationData, String organizationId, String externalTransactionId, OperationFormData formData, List params, ApplicationContext applicationContext) throws NextStepClientException { final CreateOperationRequest request = new CreateOperationRequest(); @@ -161,7 +165,7 @@ public ObjectResponse createOperation(@NotNull String o request.getParams().addAll(params); } request.setApplicationContext(applicationContext); - return postObjectImpl("/operation", new ObjectRequest<>(request), CreateOperationResponse.class); + return createOperation(request); } /** @@ -175,11 +179,23 @@ public ObjectResponse createOperation(@NotNull String o * @param applicationContext Context of application requesting the OAuth 2.1 consent. * @return A Response with CreateOperationResponse object. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #createOperation(CreateOperationRequest) */ public ObjectResponse createOperation(@NotNull String operationName, @NotNull String operationData, OperationFormData formData, String organizationId, List params, ApplicationContext applicationContext) throws NextStepClientException { return createOperation(operationName, null, operationData, organizationId, null, formData, params, applicationContext); } + /** + * Calls the create operation endpoint via POST method to create a new operation. + * + * @param request Create operation request. + * @return A Response with CreateOperationResponse object. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse createOperation(@NotNull final CreateOperationRequest request) throws NextStepClientException { + return postObjectImpl("/operation", new ObjectRequest<>(request), CreateOperationResponse.class); + } + /** * Calls the update operation endpoint via PUT method to update an existing operation. * @@ -194,6 +210,7 @@ public ObjectResponse createOperation(@NotNull String o * @param applicationContext Context of application requesting the OAuth 2.1 consent. * @return A Response with UpdateOperationResponse object. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateOperation(UpdateOperationRequest) */ public ObjectResponse updateOperation(@NotNull String operationId, String userId, String organizationId, @NotNull AuthMethod authMethod, List authInstruments, @NotNull AuthStepResult authStepResult, String authStepResultDescription, List params, ApplicationContext applicationContext, PAAuthenticationContext authenticationContext) throws NextStepClientException { final UpdateOperationRequest request = new UpdateOperationRequest(); @@ -209,6 +226,17 @@ public ObjectResponse updateOperation(@NotNull String o } request.setApplicationContext(applicationContext); request.setAuthenticationContext(authenticationContext); + return updateOperation(request); + } + + /** + * Calls the update operation endpoint via PUT method to update an existing operation. + * + * @param request Update operation request. + * @return A Response with UpdateOperationResponse object. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse updateOperation(@NotNull final UpdateOperationRequest request) throws NextStepClientException { return putObjectImpl("/operation", new ObjectRequest<>(request), UpdateOperationResponse.class); } @@ -226,6 +254,7 @@ public ObjectResponse updateOperation(@NotNull String o * @param applicationContext Context of application requesting the OAuth 2.1 consent. * @return A Response with UpdateOperationResponse object. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateOperationPost(UpdateOperationRequest) */ public ObjectResponse updateOperationPost(@NotNull String operationId, String userId, String organizationId, @NotNull AuthMethod authMethod, List authInstruments, @NotNull AuthStepResult authStepResult, String authStepResultDescription, List params, ApplicationContext applicationContext, PAAuthenticationContext authenticationContext) throws NextStepClientException { final UpdateOperationRequest request = new UpdateOperationRequest(); @@ -241,6 +270,17 @@ public ObjectResponse updateOperationPost(@NotNull Stri } request.setApplicationContext(applicationContext); request.setAuthenticationContext(authenticationContext); + return updateOperationPost(request); + } + + /** + * Calls the update operation endpoint via POST method to update an existing operation. + * + * @param request Update operation request. + * @return A Response with UpdateOperationResponse object. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse updateOperationPost(@NotNull final UpdateOperationRequest request) throws NextStepClientException { return postObjectImpl("/operation/update", new ObjectRequest<>(request), UpdateOperationResponse.class); } @@ -253,6 +293,7 @@ public ObjectResponse updateOperationPost(@NotNull Stri * @param accountStatus User account status. * @return Response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateOperationUser(UpdateOperationUserRequest) */ public Response updateOperationUser(@NotNull String operationId, @NotNull String userId, String organizationId, UserAccountStatus accountStatus) throws NextStepClientException { final UpdateOperationUserRequest request = new UpdateOperationUserRequest(); @@ -260,11 +301,22 @@ public Response updateOperationUser(@NotNull String operationId, @NotNull String request.setUserId(userId); request.setOrganizationId(organizationId); request.setAccountStatus(accountStatus); + return updateOperationUser(request); + } + + /** + * Update user, organization and account status for an operation via PUT method. + * + * @param request Update operation user request. + * @return Response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public Response updateOperationUser(@NotNull final UpdateOperationUserRequest request) throws NextStepClientException { return putObjectImpl("/operation/user", new ObjectRequest<>(request)); } /** - * UUpdate user, organization and account status for an operation via POST method. + * Update user, organization and account status for an operation via POST method. * * @param operationId Operation ID. * @param userId User ID. @@ -272,6 +324,7 @@ public Response updateOperationUser(@NotNull String operationId, @NotNull String * @param accountStatus User account status. * @return Response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateOperationUserPost(UpdateOperationUserRequest) */ public Response updateOperationUserPost(@NotNull String operationId, @NotNull String userId, String organizationId, UserAccountStatus accountStatus) throws NextStepClientException { final UpdateOperationUserRequest request = new UpdateOperationUserRequest(); @@ -279,6 +332,17 @@ public Response updateOperationUserPost(@NotNull String operationId, @NotNull St request.setUserId(userId); request.setOrganizationId(organizationId); request.setAccountStatus(accountStatus); + return updateOperationUserPost(request); + } + + /** + * Update user, organization and account status for an operation via POST method. + * + * @param request Update operation user request. + * @return Response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public Response updateOperationUserPost(@NotNull final UpdateOperationUserRequest request) throws NextStepClientException { return postObjectImpl("/operation/user/update", new ObjectRequest<>(request)); } @@ -289,11 +353,23 @@ public Response updateOperationUserPost(@NotNull String operationId, @NotNull St * @param formData Form data. * @return Object response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateOperationFormData(UpdateFormDataRequest) */ public Response updateOperationFormData(@NotNull String operationId, @NotNull OperationFormData formData) throws NextStepClientException { final UpdateFormDataRequest request = new UpdateFormDataRequest(); request.setOperationId(operationId); request.setFormData(formData); + return updateOperationFormData(request); + } + + /** + * Update operation form data via PUT method. + * + * @param request Update form data request. + * @return Object response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public Response updateOperationFormData(@NotNull final UpdateFormDataRequest request) throws NextStepClientException { return putObjectImpl("/operation/formData", new ObjectRequest<>(request)); } @@ -304,11 +380,23 @@ public Response updateOperationFormData(@NotNull String operationId, @NotNull Op * @param formData Form data. * @return Object response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateOperationFormDataPost(UpdateFormDataRequest) */ public Response updateOperationFormDataPost(@NotNull String operationId, @NotNull OperationFormData formData) throws NextStepClientException { final UpdateFormDataRequest request = new UpdateFormDataRequest(); request.setOperationId(operationId); request.setFormData(formData); + return updateOperationFormDataPost(request); + } + + /** + * Update operation form data via POST method. + * + * @param request Update form data request. + * @return Object response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public Response updateOperationFormDataPost(@NotNull final UpdateFormDataRequest request) throws NextStepClientException { return postObjectImpl("/operation/formData/update", new ObjectRequest<>(request)); } @@ -319,11 +407,23 @@ public Response updateOperationFormDataPost(@NotNull String operationId, @NotNul * @param chosenAuthMethod Chosen authentication method. * @return Object response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateChosenAuthMethod(UpdateChosenAuthMethodRequest) */ public Response updateChosenAuthMethod(@NotNull String operationId, @NotNull AuthMethod chosenAuthMethod) throws NextStepClientException { final UpdateChosenAuthMethodRequest request = new UpdateChosenAuthMethodRequest(); request.setOperationId(operationId); request.setChosenAuthMethod(chosenAuthMethod); + return updateChosenAuthMethod(request); + } + + /** + * Update chosen authentication method for current operation step via PUT method. + * + * @param request Update chosen auth method request. + * @return Object response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public Response updateChosenAuthMethod(@NotNull final UpdateChosenAuthMethodRequest request) throws NextStepClientException { return putObjectImpl("/operation/chosenAuthMethod", new ObjectRequest<>(request)); } @@ -334,11 +434,23 @@ public Response updateChosenAuthMethod(@NotNull String operationId, @NotNull Aut * @param chosenAuthMethod Chosen authentication method. * @return Object response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateChosenAuthMethodPost(UpdateChosenAuthMethodRequest) */ public Response updateChosenAuthMethodPost(@NotNull String operationId, @NotNull AuthMethod chosenAuthMethod) throws NextStepClientException { final UpdateChosenAuthMethodRequest request = new UpdateChosenAuthMethodRequest(); request.setOperationId(operationId); request.setChosenAuthMethod(chosenAuthMethod); + return updateChosenAuthMethodPost(request); + } + + /** + * Update chosen authentication method for current operation step via POST method. + * + * @param request Update chosen auth method request. + * @return Object response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public Response updateChosenAuthMethodPost(@NotNull final UpdateChosenAuthMethodRequest request) throws NextStepClientException { return postObjectImpl("/operation/chosenAuthMethod/update", new ObjectRequest<>(request)); } @@ -349,11 +461,23 @@ public Response updateChosenAuthMethodPost(@NotNull String operationId, @NotNull * @param applicationContext Application context. * @return Object response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateApplicationContext(UpdateApplicationContextRequest) */ public Response updateApplicationContext(@NotNull String operationId, @NotNull ApplicationContext applicationContext) throws NextStepClientException { final UpdateApplicationContextRequest request = new UpdateApplicationContextRequest(); request.setOperationId(operationId); request.setApplicationContext(applicationContext); + return updateApplicationContext(request); + } + + /** + * Update application context for current operation step via PUT method. + * + * @param request Update application context request. + * @return Object response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public Response updateApplicationContext(@NotNull final UpdateApplicationContextRequest request) throws NextStepClientException { return putObjectImpl("/operation/application", new ObjectRequest<>(request)); } @@ -364,11 +488,23 @@ public Response updateApplicationContext(@NotNull String operationId, @NotNull A * @param applicationContext Application context. * @return Object response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateApplicationContextPost(UpdateApplicationContextRequest) */ public Response updateApplicationContextPost(@NotNull String operationId, @NotNull ApplicationContext applicationContext) throws NextStepClientException { final UpdateApplicationContextRequest request = new UpdateApplicationContextRequest(); request.setOperationId(operationId); request.setApplicationContext(applicationContext); + return updateApplicationContextPost(request); + } + + /** + * Update application context for current operation step via POST method. + * + * @param request Update application context request. + * @return Object response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public Response updateApplicationContextPost(@NotNull final UpdateApplicationContextRequest request) throws NextStepClientException { return postObjectImpl("/operation/application/update", new ObjectRequest<>(request)); } @@ -379,11 +515,23 @@ public Response updateApplicationContextPost(@NotNull String operationId, @NotNu * @param mobileTokenActive Whether mobile token is active. * @return Object response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateMobileToken(UpdateMobileTokenRequest) */ public Response updateMobileToken(@NotNull String operationId, boolean mobileTokenActive) throws NextStepClientException { final UpdateMobileTokenRequest request = new UpdateMobileTokenRequest(); request.setOperationId(operationId); request.setMobileTokenActive(mobileTokenActive); + return updateMobileToken(request); + } + + /** + * Update mobile token status for current operation step via PUT method. + * + * @param request Update mobile token request. + * @return Object response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public Response updateMobileToken(@NotNull final UpdateMobileTokenRequest request) throws NextStepClientException { return putObjectImpl("/operation/mobileToken/status", new ObjectRequest<>(request)); } @@ -394,16 +542,28 @@ public Response updateMobileToken(@NotNull String operationId, boolean mobileTok * @param mobileTokenActive Whether mobile token is active. * @return Object response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateMobileTokenPost(UpdateMobileTokenRequest) */ public Response updateMobileTokenPost(@NotNull String operationId, boolean mobileTokenActive) throws NextStepClientException { final UpdateMobileTokenRequest request = new UpdateMobileTokenRequest(); request.setOperationId(operationId); request.setMobileTokenActive(mobileTokenActive); + return updateMobileTokenPost(request); + } + + /** + * Update mobile token status for current operation step via POST method. + * + * @param request Update mobile token request. + * @return Object response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public Response updateMobileTokenPost(@NotNull final UpdateMobileTokenRequest request) throws NextStepClientException { return postObjectImpl("/operation/mobileToken/status/update", new ObjectRequest<>(request)); } /** - * Get mobile token configuration configuration. + * Get mobile token configuration using GET method. * * @param userId User ID. * @param operationName Operation name. @@ -422,24 +582,36 @@ public ObjectResponse getMobileTokenConfig(@NotNul } /** - * Get mobile token configuration configuration using POST method. + * Get mobile token configuration using POST method. * * @param userId User ID. * @param operationName Operation name. * @param authMethod Authentication method. * @return Mobile token configuration. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #getMobileTokenConfigPost(GetMobileTokenConfigRequest) */ public ObjectResponse getMobileTokenConfigPost(@NotNull String userId, @NotNull String operationName, @NotNull AuthMethod authMethod) throws NextStepClientException { final GetMobileTokenConfigRequest request = new GetMobileTokenConfigRequest(); request.setUserId(userId); request.setOperationName(operationName); request.setAuthMethod(authMethod); + return getMobileTokenConfigPost(request); + } + + /** + * Get mobile token configuration using POST method. + * + * @param request Get mobile token config request. + * @return Mobile token configuration. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse getMobileTokenConfigPost(@NotNull final GetMobileTokenConfigRequest request) throws NextStepClientException { return postObjectImpl("/operation/mobileToken/config/detail", new ObjectRequest<>(request), GetMobileTokenConfigResponse.class); } /** - * Calls the operation details endpoint via POST method to get operation details. + * Calls the operation details endpoint via GET method to get operation details. * * @param operationId Operation ID. * @return A Response with {@link GetOperationDetailResponse} object. @@ -489,6 +661,7 @@ public ObjectResponse lookupOperationByExt * @param responseAfsExtras AFS response extras. * @return Response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #createAfsAction(CreateAfsActionRequest) */ public Response createAfsAction(@NotNull String operationId, @NotNull String afsAction, int stepIndex, String requestAfsExtras, String afsLabel, boolean afsResponseApplied, String responseAfsExtras) throws NextStepClientException { @@ -501,6 +674,17 @@ public Response createAfsAction(@NotNull String operationId, @NotNull String afs request.setAfsResponseApplied(afsResponseApplied); request.setResponseAfsExtras(responseAfsExtras); request.setTimestampCreated(new Date()); + return createAfsAction(request); + } + + /** + * Create an AFS action in Next Step and log its request and response parameters. + * + * @param request Create AFS action request. + * @return Response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public Response createAfsAction(@NotNull final CreateAfsActionRequest request) throws NextStepClientException { return postObjectImpl("/operation/afs/action", new ObjectRequest<>(request)); } @@ -627,6 +811,7 @@ public ObjectResponse> getPendingOperationsPost * @param orderNumber Order number. * @return Create organization response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #createOrganization(CreateOrganizationRequest) */ public ObjectResponse createOrganization(@NotNull String organizationId, String displayNameKey, boolean isDefault, @NotNull Integer orderNumber) throws NextStepClientException { @@ -635,6 +820,17 @@ public ObjectResponse createOrganization(@NotNull St request.setDisplayNameKey(displayNameKey); request.setDefault(isDefault); request.setOrderNumber(orderNumber); + return createOrganization(request); + } + + /** + * Create an organization. + * + * @param request Create organization request. + * @return Create organization response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse createOrganization(@NotNull final CreateOrganizationRequest request) throws NextStepClientException { return postObjectImpl("/organization", new ObjectRequest<>(request), CreateOrganizationResponse.class); } @@ -844,6 +1040,7 @@ public ObjectResponse getAuthMethodsEnabledForUser * @param config Authentication method configuration. * @return List of enabled authentication methods for given user wrapped in GetAuthMethodsResponse. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #enableAuthMethodForUser(UpdateAuthMethodRequest) */ public ObjectResponse enableAuthMethodForUser(@NotNull String userId, @NotNull AuthMethod authMethod, Map config) throws NextStepClientException { final UpdateAuthMethodRequest request = new UpdateAuthMethodRequest(); @@ -852,6 +1049,17 @@ public ObjectResponse enableAuthMethodForUser(@NotNull S if (config != null) { request.getConfig().putAll(config); } + return enableAuthMethodForUser(request); + } + + /** + * Enable an authentication method for given user. + * + * @param request Update auth method request. + * @return List of enabled authentication methods for given user wrapped in GetAuthMethodsResponse. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse enableAuthMethodForUser(@NotNull final UpdateAuthMethodRequest request) throws NextStepClientException { return postObjectImpl("/user/auth-method", new ObjectRequest<>(request), GetAuthMethodsResponse.class); } @@ -863,6 +1071,7 @@ public ObjectResponse enableAuthMethodForUser(@NotNull S * @param config Authentication method configuration. * @return List of enabled authentication methods for given user wrapped in GetAuthMethodsResponse. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #disableAuthMethodForUser(UpdateAuthMethodRequest) */ public ObjectResponse disableAuthMethodForUser(@NotNull String userId, @NotNull AuthMethod authMethod, Map config) throws NextStepClientException { final UpdateAuthMethodRequest request = new UpdateAuthMethodRequest(); @@ -871,6 +1080,17 @@ public ObjectResponse disableAuthMethodForUser(@NotNull if (config != null) { request.getConfig().putAll(config); } + return disableAuthMethodForUser(request); + } + + /** + * Disable an authentication method for given user. + * + * @param request Update auth method request. + * @return List of enabled authentication methods for given user wrapped in GetAuthMethodsResponse. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse disableAuthMethodForUser(@NotNull final UpdateAuthMethodRequest request) throws NextStepClientException { return postObjectImpl("/user/auth-method/delete", new ObjectRequest<>(request), GetAuthMethodsResponse.class); } @@ -883,11 +1103,23 @@ public ObjectResponse disableAuthMethodForUser(@NotNull * @param description Application description. * @return Create application response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #createApplication(CreateApplicationRequest) */ public ObjectResponse createApplication(@NotNull String applicationName, String description) throws NextStepClientException { final CreateApplicationRequest request = new CreateApplicationRequest(); request.setApplicationName(applicationName); request.setDescription(description); + return createApplication(request); + } + + /** + * Create a Next Step application. + * + * @param request Createa application request. + * @return Create application response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse createApplication(@NotNull final CreateApplicationRequest request) throws NextStepClientException { return postObjectImpl("/application", new ObjectRequest<>(request), CreateApplicationResponse.class); } @@ -899,12 +1131,24 @@ public ObjectResponse createApplication(@NotNull Stri * @param status Application status. * @return Update application response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateApplication(UpdateApplicationRequest) */ public ObjectResponse updateApplication(@NotNull String applicationName, String description, ApplicationStatus status) throws NextStepClientException { final UpdateApplicationRequest request = new UpdateApplicationRequest(); request.setApplicationName(applicationName); request.setDescription(description); request.setApplicationStatus(status); + return updateApplication(request); + } + + /** + * Update a Next Step application via PUT method. + * + * @param request Update application request. + * @return Update application response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse updateApplication(@NotNull final UpdateApplicationRequest request) throws NextStepClientException { return putObjectImpl("/application", new ObjectRequest<>(request), UpdateApplicationResponse.class); } @@ -916,12 +1160,24 @@ public ObjectResponse updateApplication(@NotNull Stri * @param status Application status. * @return Update application response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateApplicationPost(UpdateApplicationRequest) */ public ObjectResponse updateApplicationPost(@NotNull String applicationName, String description, ApplicationStatus status) throws NextStepClientException { final UpdateApplicationRequest request = new UpdateApplicationRequest(); request.setApplicationName(applicationName); request.setDescription(description); request.setApplicationStatus(status); + return updateApplicationPost(request); + } + + /** + * Update a Next Step application via POST method. + * + * @param request Update application request. + * @return Update application response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse updateApplicationPost(@NotNull final UpdateApplicationRequest request) throws NextStepClientException { return postObjectImpl("/application/update", new ObjectRequest<>(request), UpdateApplicationResponse.class); } @@ -973,11 +1229,23 @@ public ObjectResponse deleteApplication(@NotNull Stri * @param description Role description. * @return Create user role response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #createRole(CreateRoleRequest) */ public ObjectResponse createRole(@NotNull String roleName, String description) throws NextStepClientException { final CreateRoleRequest request = new CreateRoleRequest(); request.setRoleName(roleName); request.setDescription(description); + return createRole(request); + } + + /** + * Create a user role. + * + * @param request Create role request. + * @return Create user role response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse createRole(@NotNull final CreateRoleRequest request) throws NextStepClientException { return postObjectImpl("/role", new ObjectRequest<>(request), CreateRoleResponse.class); } @@ -1025,6 +1293,7 @@ public ObjectResponse deleteRole(@NotNull String roleName) t * @param parameters Hashing algorithm parameters. * @return Create hashing configuration response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #createHashConfig(CreateHashConfigRequest) */ public ObjectResponse createHashConfig(@NotNull String hashConfigName, @NotNull HashAlgorithm algorithm, Map parameters) throws NextStepClientException { final CreateHashConfigRequest request = new CreateHashConfigRequest(); @@ -1033,6 +1302,17 @@ public ObjectResponse createHashConfig(@NotNull String if (parameters != null) { request.getParameters().putAll(parameters); } + return createHashConfig(request); + } + + /** + * Create a hashing configuration. + * + * @param request Create hash config request. + * @return Create hashing configuration response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse createHashConfig(@NotNull final CreateHashConfigRequest request) throws NextStepClientException { return postObjectImpl("/hashconfig", new ObjectRequest<>(request), CreateHashConfigResponse.class); } @@ -1045,6 +1325,7 @@ public ObjectResponse createHashConfig(@NotNull String * @param status Hashing configuration status. * @return Update hashing configuration response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateHashConfig(UpdateHashConfigRequest) */ public ObjectResponse updateHashConfig(@NotNull String hashConfigName, @NotNull HashAlgorithm algorithm, Map parameters, HashConfigStatus status) throws NextStepClientException { final UpdateHashConfigRequest request = new UpdateHashConfigRequest(); @@ -1054,6 +1335,17 @@ public ObjectResponse updateHashConfig(@NotNull String request.getParameters().putAll(parameters); } request.setHashConfigStatus(status); + return updateHashConfig(request); + } + + /** + * Update a hashing configuration via PUT method. + * + * @param request Update hash config request. + * @return Update hashing configuration response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse updateHashConfig(@NotNull final UpdateHashConfigRequest request) throws NextStepClientException { return putObjectImpl("/hashconfig", new ObjectRequest<>(request), UpdateHashConfigResponse.class); } @@ -1066,6 +1358,7 @@ public ObjectResponse updateHashConfig(@NotNull String * @param status Hashing configuration status. * @return Update hashing configuration response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateHashConfigPost(UpdateHashConfigRequest) */ public ObjectResponse updateHashConfigPost(@NotNull String hashConfigName, @NotNull HashAlgorithm algorithm, Map parameters, HashConfigStatus status) throws NextStepClientException { final UpdateHashConfigRequest request = new UpdateHashConfigRequest(); @@ -1075,6 +1368,17 @@ public ObjectResponse updateHashConfigPost(@NotNull St request.getParameters().putAll(parameters); } request.setHashConfigStatus(status); + return updateHashConfigPost(request); + } + + /** + * Update a hashing configuration via POST method. + * + * @param request Update hash config request. + * @return Update hashing configuration response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse updateHashConfigPost(@NotNull final UpdateHashConfigRequest request) throws NextStepClientException { return postObjectImpl("/hashconfig/update", new ObjectRequest<>(request), UpdateHashConfigResponse.class); } @@ -1455,11 +1759,23 @@ public ObjectResponse updateUserPost(@NotNull UpdateUserRequ * @param status Status to use. * @return Update users response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateUsers(UpdateUsersRequest) */ public ObjectResponse updateUsers(@NotNull List userIds, @NotNull UserIdentityStatus status) throws NextStepClientException { final UpdateUsersRequest request = new UpdateUsersRequest(); request.getUserIds().addAll(userIds); request.setUserIdentityStatus(status); + return updateUsers(request); + } + + /** + * Update statuses of multiple user identities. + * + * @param request Update users request. + * @return Update users response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse updateUsers(@NotNull final UpdateUsersRequest request) throws NextStepClientException { return postObjectImpl("/user/update/multi", new ObjectRequest<>(request), UpdateUsersResponse.class); } @@ -1511,12 +1827,13 @@ public ObjectResponse lookupUsers(@NotNull LookupUsersReque * @param credentialName Credential name. * @return Lookup user response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #lookupUser(LookupUserRequest) */ public ObjectResponse lookupUser(@NotNull String username, @NotNull String credentialName) throws NextStepClientException { final LookupUserRequest request = new LookupUserRequest(); request.setUsername(username); request.setCredentialName(credentialName); - return postObjectImpl("/user/lookup/single", new ObjectRequest<>(request), LookupUserResponse.class); + return lookupUser(request); } /** @@ -1527,12 +1844,24 @@ public ObjectResponse lookupUser(@NotNull String username, @ * @param operationId Operation ID. * @return Lookup user response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #lookupUser(LookupUserRequest) */ public ObjectResponse lookupUser(@NotNull String username, @NotNull String credentialName, String operationId) throws NextStepClientException { final LookupUserRequest request = new LookupUserRequest(); request.setUsername(username); request.setCredentialName(credentialName); request.setOperationId(operationId); + return lookupUser(request); + } + + /** + * Lookup a single user identity. + * + * @param request Lookup user request. + * @return Lookup user response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse lookupUser(@NotNull final LookupUserRequest request) throws NextStepClientException { return postObjectImpl("/user/lookup/single", new ObjectRequest<>(request), LookupUserResponse.class); } @@ -1582,11 +1911,23 @@ public ObjectResponse deleteUser(@NotNull String userId) thr * @param roleName Role name. * @return Add user role response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #addUserRole(AddUserRoleRequest) */ public ObjectResponse addUserRole(@NotNull String userId, @NotNull String roleName) throws NextStepClientException { final AddUserRoleRequest request = new AddUserRoleRequest(); request.setUserId(userId); request.setRoleName(roleName); + return addUserRole(request); + } + + /** + * Add a role to a user. + * + * @param request Add user role request. + * @return Add user role response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse addUserRole(@NotNull final AddUserRoleRequest request) throws NextStepClientException { return postObjectImpl("/user/role", new ObjectRequest<>(request), AddUserRoleResponse.class); } @@ -1597,11 +1938,23 @@ public ObjectResponse addUserRole(@NotNull String userId, @ * @param roleName Role name. * @return Remove user role response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #removeUserRole(RemoveUserRoleRequest) */ public ObjectResponse removeUserRole(@NotNull String userId, @NotNull String roleName) throws NextStepClientException { final RemoveUserRoleRequest request = new RemoveUserRoleRequest(); request.setUserId(userId); request.setRoleName(roleName); + return removeUserRole(request); + } + + /** + * Remove a role to a user. + * + * @param request Remove user role request. + * @return Remove user role response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse removeUserRole(@NotNull final RemoveUserRoleRequest request) throws NextStepClientException { return postObjectImpl("/user/role/remove", new ObjectRequest<>(request), RemoveUserRoleResponse.class); } @@ -1615,6 +1968,7 @@ public ObjectResponse removeUserRole(@NotNull String use * @param primary Whether contact is primary. * @return Create user contact response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #createUserContact(CreateUserContactRequest) */ public ObjectResponse createUserContact(@NotNull String userId, @NotNull String contactName, @NotNull ContactType contactType, @NotNull String contactValue, boolean primary) throws NextStepClientException { @@ -1624,6 +1978,17 @@ public ObjectResponse createUserContact(@NotNull Stri request.setContactType(contactType); request.setContactValue(contactValue); request.setPrimary(primary); + return createUserContact(request); + } + + /** + * Create a user contact. + * + * @param request Create user contact request. + * @return Create user contact response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse createUserContact(@NotNull final CreateUserContactRequest request) throws NextStepClientException { return postObjectImpl("/user/contact", new ObjectRequest<>(request), CreateUserContactResponse.class); } @@ -1637,6 +2002,7 @@ public ObjectResponse createUserContact(@NotNull Stri * @param primary Whether contact is primary. * @return Update user contact response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateUserContact(UpdateUserContactRequest) */ public ObjectResponse updateUserContact(@NotNull String userId, @NotNull String contactName, @NotNull ContactType contactType, @NotNull String contactValue, boolean primary) throws NextStepClientException { @@ -1646,6 +2012,17 @@ public ObjectResponse updateUserContact(@NotNull Stri request.setContactType(contactType); request.setContactValue(contactValue); request.setPrimary(primary); + return updateUserContact(request); + } + + /** + * Update a user contact via PUT method. + * + * @param request Update user contact request. + * @return Update user contact response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse updateUserContact(@NotNull final UpdateUserContactRequest request) throws NextStepClientException { return putObjectImpl("/user/contact", new ObjectRequest<>(request), UpdateUserContactResponse.class); } @@ -1659,6 +2036,7 @@ public ObjectResponse updateUserContact(@NotNull Stri * @param primary Whether contact is primary. * @return Update user contact response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateUserContactPost(UpdateUserContactRequest) */ public ObjectResponse updateUserContactPost(@NotNull String userId, @NotNull String contactName, @NotNull ContactType contactType, @NotNull String contactValue, boolean primary) throws NextStepClientException { @@ -1668,6 +2046,17 @@ public ObjectResponse updateUserContactPost(@NotNull request.setContactType(contactType); request.setContactValue(contactValue); request.setPrimary(primary); + return updateUserContactPost(request); + } + + /** + * Update a user contact via POST method. + * + * @param request Update user contact request. + * @return Update user contact response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse updateUserContactPost(@NotNull final UpdateUserContactRequest request) throws NextStepClientException { return postObjectImpl("/user/contact/update", new ObjectRequest<>(request), UpdateUserContactResponse.class); } @@ -1705,12 +2094,24 @@ public ObjectResponse getUserContactListPost(@NotNul * @param contactType Contact type. * @return Delete user contact response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #deleteUserContact(DeleteUserContactRequest) */ public ObjectResponse deleteUserContact(@NotNull String userId, @NotNull String contactName, @NotNull ContactType contactType) throws NextStepClientException { final DeleteUserContactRequest request = new DeleteUserContactRequest(); request.setUserId(userId); request.setContactName(contactName); request.setContactType(contactType); + return deleteUserContact(request); + } + + /** + * Delete a user contact. + * + * @param request Delete user contact request. + * @return Delete user contact response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse deleteUserContact(@NotNull final DeleteUserContactRequest request) throws NextStepClientException { return postObjectImpl("/user/contact/delete", new ObjectRequest<>(request), DeleteUserContactResponse.class); } @@ -1723,6 +2124,7 @@ public ObjectResponse deleteUserContact(@NotNull Stri * @param extras Extra information related to the alias. * @return Create user alias response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #createUserAlias(CreateUserAliasRequest) */ public ObjectResponse createUserAlias(@NotNull String userId, @NotNull String aliasName, @NotNull String aliasValue, Map extras) throws NextStepClientException { @@ -1733,6 +2135,17 @@ public ObjectResponse createUserAlias(@NotNull String u if (extras != null) { request.getExtras().putAll(extras); } + return createUserAlias(request); + } + + /** + * Create a user alias. + * + * @param request Create user alias request. + * @return Create user alias response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse createUserAlias(@NotNull final CreateUserAliasRequest request) throws NextStepClientException { return postObjectImpl("/user/alias", new ObjectRequest<>(request), CreateUserAliasResponse.class); } @@ -1745,6 +2158,7 @@ public ObjectResponse createUserAlias(@NotNull String u * @param extras Extra information related to the alias. * @return Update user alias response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateUserAlias(UpdateUserAliasRequest) */ public ObjectResponse updateUserAlias(@NotNull String userId, @NotNull String aliasName, @NotNull String aliasValue, Map extras) throws NextStepClientException { @@ -1755,6 +2169,17 @@ public ObjectResponse updateUserAlias(@NotNull String u if (extras != null) { request.getExtras().putAll(extras); } + return updateUserAlias(request); + } + + /** + * Update a user alias via PUT method. + * + * @param request Update user alias request. + * @return Update user alias response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse updateUserAlias(@NotNull final UpdateUserAliasRequest request) throws NextStepClientException { return putObjectImpl("/user/alias", new ObjectRequest<>(request), UpdateUserAliasResponse.class); } @@ -1767,6 +2192,7 @@ public ObjectResponse updateUserAlias(@NotNull String u * @param extras Extra information related to the alias. * @return Update user alias response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateUserAliasPost(UpdateUserAliasRequest) */ public ObjectResponse updateUserAliasPost(@NotNull String userId, @NotNull String aliasName, @NotNull String aliasValue, Map extras) throws NextStepClientException { @@ -1777,6 +2203,17 @@ public ObjectResponse updateUserAliasPost(@NotNull Stri if (extras != null) { request.getExtras().putAll(extras); } + return updateUserAliasPost(request); + } + + /** + * Update a user alias via POST method. + * + * @param request Update user alias request. + * @return Update user alias response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse updateUserAliasPost(@NotNull final UpdateUserAliasRequest request) throws NextStepClientException { return postObjectImpl("/user/alias/update", new ObjectRequest<>(request), UpdateUserAliasResponse.class); } @@ -1817,11 +2254,23 @@ public ObjectResponse getUserAliasListPost(@NotNull St * @param aliasName Alias name. * @return Delete user alias response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #deleteUserAlias(DeleteUserAliasRequest) */ public ObjectResponse deleteUserAlias(@NotNull String userId, @NotNull String aliasName) throws NextStepClientException { final DeleteUserAliasRequest request = new DeleteUserAliasRequest(); request.setUserId(userId); request.setAliasName(aliasName); + return deleteUserAlias(request); + } + + /** + * Delete a user alias. + * + * @param request Delete user alias request. + * @return Delete user alias response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse deleteUserAlias(@NotNull final DeleteUserAliasRequest request) throws NextStepClientException { return postObjectImpl("/user/alias/delete", new ObjectRequest<>(request), DeleteUserAliasResponse.class); } @@ -1905,6 +2354,7 @@ public ObjectResponse getUserAuthenticationLi * @param credentialValue Credential value. * @return Create credential response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #createCredential(CreateCredentialRequest) */ public ObjectResponse createCredential(@NotNull String userId, @NotNull String credentialName, @NotNull CredentialType credentialType, String username, String credentialValue) throws NextStepClientException { @@ -1914,7 +2364,7 @@ public ObjectResponse createCredential(@NotNull String request.setCredentialType(credentialType); request.setUsername(username); request.setCredentialValue(credentialValue); - return postObjectImpl("/credential", new ObjectRequest<>(request), CreateCredentialResponse.class); + return createCredential(request); } /** @@ -1929,6 +2379,7 @@ public ObjectResponse createCredential(@NotNull String * @param credentialHistory List with pairs of username : credentialValue for credential history. * @return Create credential response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #createCredential(CreateCredentialRequest) */ public ObjectResponse createCredential(@NotNull String userId, @NotNull String credentialName, @NotNull CredentialType credentialType, String username, String credentialValue, CredentialValidationMode validationMode, @@ -1948,6 +2399,17 @@ public ObjectResponse createCredential(@NotNull String request.getCredentialHistory().add(h); }); } + return createCredential(request); + } + + /** + * Create a credential. + * + * @param request Create credential request. + * @return Create credential response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse createCredential(@NotNull final CreateCredentialRequest request) throws NextStepClientException { return postObjectImpl("/credential", new ObjectRequest<>(request), CreateCredentialResponse.class); } @@ -1962,6 +2424,7 @@ public ObjectResponse createCredential(@NotNull String * @param credentialStatus Credential status. * @return Update credential response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateCredential(UpdateCredentialRequest) */ public ObjectResponse updateCredential(@NotNull String userId, @NotNull String credentialName, CredentialType credentialType, String username, String credentialValue, CredentialStatus credentialStatus) throws NextStepClientException { @@ -1972,6 +2435,17 @@ public ObjectResponse updateCredential(@NotNull String request.setUsername(username); request.setCredentialValue(credentialValue); request.setCredentialStatus(credentialStatus); + return updateCredential(request); + } + + /** + * Update a credential via PUT method. + * + * @param request Update credential request. + * @return Update credential response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse updateCredential(@NotNull final UpdateCredentialRequest request) throws NextStepClientException { return putObjectImpl("/credential", new ObjectRequest<>(request), UpdateCredentialResponse.class); } @@ -1986,6 +2460,7 @@ public ObjectResponse updateCredential(@NotNull String * @param credentialStatus Credential status. * @return Update credential response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateCredentialPost(UpdateCredentialRequest) */ public ObjectResponse updateCredentialPost(@NotNull String userId, @NotNull String credentialName, CredentialType credentialType, String username, String credentialValue, CredentialStatus credentialStatus) throws NextStepClientException { @@ -1996,6 +2471,17 @@ public ObjectResponse updateCredentialPost(@NotNull St request.setUsername(username); request.setCredentialValue(credentialValue); request.setCredentialStatus(credentialStatus); + return updateCredentialPost(request); + } + + /** + * Update a credential via POST method. + * + * @param request Update credential request. + * @return Update credential response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse updateCredentialPost(@NotNull final UpdateCredentialRequest request) throws NextStepClientException { return postObjectImpl("/credential/update", new ObjectRequest<>(request), UpdateCredentialResponse.class); } @@ -2009,6 +2495,7 @@ public ObjectResponse updateCredentialPost(@NotNull St * @param validationMode Credential validation mode. * @return Validate credential response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #validateCredential(ValidateCredentialRequest) */ public ObjectResponse validateCredential(@NotNull String userId, @NotNull String credentialName, String username, String credentialValue, @NotNull CredentialValidationMode validationMode) throws NextStepClientException { @@ -2018,6 +2505,17 @@ public ObjectResponse validateCredential(@NotNull St request.setUsername(username); request.setCredentialValue(credentialValue); request.setValidationMode(validationMode); + return validateCredential(request); + } + + /** + * Validate a credential. + * + * @param request Validate credential request. + * @return Validate credential response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse validateCredential(@NotNull final ValidateCredentialRequest request) throws NextStepClientException { return postObjectImpl("/credential/validate", new ObjectRequest<>(request), ValidateCredentialResponse.class); } @@ -2029,12 +2527,24 @@ public ObjectResponse validateCredential(@NotNull St * @param credentialType Credential type. * @return Reset credential response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #resetCredential(ResetCredentialRequest) */ public ObjectResponse resetCredential(@NotNull String userId, @NotNull String credentialName, CredentialType credentialType) throws NextStepClientException { final ResetCredentialRequest request = new ResetCredentialRequest(); request.setUserId(userId); request.setCredentialName(credentialName); request.setCredentialType(credentialType); + return resetCredential(request); + } + + /** + * Reset a credential. + * + * @param request Reset credential request. + * @return Reset credential response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse resetCredential(@NotNull final ResetCredentialRequest request) throws NextStepClientException { return postObjectImpl("/credential/reset", new ObjectRequest<>(request), ResetCredentialResponse.class); } @@ -2045,11 +2555,23 @@ public ObjectResponse resetCredential(@NotNull String u * @param credentialName Credential name. * @return Block credential response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #blockCredential(BlockCredentialRequest) */ public ObjectResponse blockCredential(@NotNull String userId, @NotNull String credentialName) throws NextStepClientException { final BlockCredentialRequest request = new BlockCredentialRequest(); request.setUserId(userId); request.setCredentialName(credentialName); + return blockCredential(request); + } + + /** + * Block a credential. + * + * @param request Block credential request. + * @return Block credential response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse blockCredential(@NotNull final BlockCredentialRequest request) throws NextStepClientException { return postObjectImpl("/credential/block", new ObjectRequest<>(request), BlockCredentialResponse.class); } @@ -2060,11 +2582,23 @@ public ObjectResponse blockCredential(@NotNull String u * @param credentialName Credential name. * @return Unblock credential response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #unblockCredential(UnblockCredentialRequest) */ public ObjectResponse unblockCredential(@NotNull String userId, @NotNull String credentialName) throws NextStepClientException { final UnblockCredentialRequest request = new UnblockCredentialRequest(); request.setUserId(userId); request.setCredentialName(credentialName); + return unblockCredential(request); + } + + /** + * Unblock a credential. + * + * @param request Unblock credential request. + * @return Unblock credential response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse unblockCredential(@NotNull final UnblockCredentialRequest request) throws NextStepClientException { return postObjectImpl("/credential/unblock", new ObjectRequest<>(request), UnblockCredentialResponse.class); } @@ -2075,11 +2609,23 @@ public ObjectResponse unblockCredential(@NotNull Stri * @param credentialName Credential name. * @return Delete credential response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #deleteCredential(DeleteCredentialRequest) */ public ObjectResponse deleteCredential(@NotNull String userId, @NotNull String credentialName) throws NextStepClientException { final DeleteCredentialRequest request = new DeleteCredentialRequest(); request.setUserId(userId); request.setCredentialName(credentialName); + return deleteCredential(request); + } + + /** + * Delete a credential. + * + * @param request Delete credential request. + * @return Delete credential response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse deleteCredential(@NotNull final DeleteCredentialRequest request) throws NextStepClientException { return postObjectImpl("/credential/delete", new ObjectRequest<>(request), DeleteCredentialResponse.class); } @@ -2093,12 +2639,24 @@ public ObjectResponse deleteCredential(@NotNull String * @param authenticationResult Authentication result. * @return Update credential counter response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #updateCredentialCounter(UpdateCounterRequest) */ public ObjectResponse updateCredentialCounter(@NotNull String userId, @NotNull String credentialName, @NotNull AuthenticationResult authenticationResult) throws NextStepClientException { final UpdateCounterRequest request = new UpdateCounterRequest(); request.setUserId(userId); request.setCredentialName(credentialName); request.setAuthenticationResult(authenticationResult); + return updateCredentialCounter(request); + } + + /** + * Update a credential counter. + * + * @param request Update counter request. + * @return Update credential counter response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse updateCredentialCounter(@NotNull final UpdateCounterRequest request) throws NextStepClientException { return postObjectImpl("/credential/counter/update", new ObjectRequest<>(request), UpdateCounterResponse.class); } @@ -2125,6 +2683,7 @@ public ObjectResponse resetAllCounters(ResetCountersReque * @param operationId Operation ID. * @return Create OTP response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #createOtp(CreateOtpRequest) */ public ObjectResponse createOtp(String userId, @NotNull String otpName, String credentialName, String otpData, String operationId) throws NextStepClientException { final CreateOtpRequest request = new CreateOtpRequest(); @@ -2133,7 +2692,7 @@ public ObjectResponse createOtp(String userId, @NotNull Strin request.setCredentialName(credentialName); request.setOtpData(otpData); request.setOperationId(operationId); - return postObjectImpl("/otp", new ObjectRequest<>(request), CreateOtpResponse.class); + return createOtp(request); } /** @@ -2145,6 +2704,7 @@ public ObjectResponse createOtp(String userId, @NotNull Strin * @param otpData OTP data. * @return Create OTP response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #createOtp(CreateOtpRequest) */ public ObjectResponse createOtp(String userId, @NotNull String otpName, String credentialName, String otpData) throws NextStepClientException { final CreateOtpRequest request = new CreateOtpRequest(); @@ -2152,6 +2712,17 @@ public ObjectResponse createOtp(String userId, @NotNull Strin request.setOtpName(otpName); request.setCredentialName(credentialName); request.setOtpData(otpData); + return createOtp(request); + } + + /** + * Create an OTP. + * + * @param request Create OTP request. + * @return Create OTP response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse createOtp(final CreateOtpRequest request) throws NextStepClientException { return postObjectImpl("/otp", new ObjectRequest<>(request), CreateOtpResponse.class); } @@ -2166,6 +2737,7 @@ public ObjectResponse createOtp(String userId, @NotNull Strin * @param language Language as defined in ISO-639 with 2 characters. * @return Create and send OTP response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #createAndSendOtp(CreateAndSendOtpRequest) */ public ObjectResponse createAndSendOtp(String userId, @NotNull String otpName, String credentialName, String otpData, String operationId, String language) throws NextStepClientException { final CreateAndSendOtpRequest request = new CreateAndSendOtpRequest(); @@ -2175,6 +2747,17 @@ public ObjectResponse createAndSendOtp(String userId, request.setOtpData(otpData); request.setOperationId(operationId); request.setLanguage(language); + return createAndSendOtp(request); + } + + /** + * Create an OTP with operation and send it. + * + * @param request Create and send OTP request. + * @return Create and send OTP response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse createAndSendOtp(final CreateAndSendOtpRequest request) throws NextStepClientException { return postObjectImpl("/otp/send", new ObjectRequest<>(request), CreateAndSendOtpResponse.class); } @@ -2249,11 +2832,23 @@ public ObjectResponse getOtpDetailPost(String otpId, Strin * @param operationId Operation ID. * @return Delete OTP response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #deleteOtp(DeleteOtpRequest) */ public ObjectResponse deleteOtp(String otpId, String operationId) throws NextStepClientException { final DeleteOtpRequest request = new DeleteOtpRequest(); request.setOtpId(otpId); request.setOperationId(operationId); + return deleteOtp(request); + } + + /** + * Delete an OTP. + * + * @param request Delete OTP request. + * @return Delete OTP response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse deleteOtp(@NotNull final DeleteOtpRequest request) throws NextStepClientException { return postObjectImpl("/otp/delete", new ObjectRequest<>(request), DeleteOtpResponse.class); } @@ -2266,12 +2861,13 @@ public ObjectResponse deleteOtp(String otpId, String operatio * @param otpValue OTP value. * @return OTP authentication response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #authenticateWithOtp(OtpAuthenticationRequest) */ public ObjectResponse authenticateWithOtp(String otpId, @NotNull String otpValue) throws NextStepClientException { final OtpAuthenticationRequest request = new OtpAuthenticationRequest(); request.setOtpId(otpId); request.setOtpValue(otpValue); - return postObjectImpl("/auth/otp", new ObjectRequest<>(request), OtpAuthenticationResponse.class); + return authenticateWithOtp(request); } /** @@ -2284,6 +2880,7 @@ public ObjectResponse authenticateWithOtp(String otpI * @param authMethod Authentication method used for operation update. * @return OTP authentication response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #authenticateWithOtp(OtpAuthenticationRequest) */ public ObjectResponse authenticateWithOtp(String otpId, String operationId, @NotNull String otpValue, boolean updateOperation, AuthMethod authMethod) throws NextStepClientException { @@ -2293,7 +2890,7 @@ public ObjectResponse authenticateWithOtp(String otpI request.setOtpValue(otpValue); request.setUpdateOperation(updateOperation); request.setAuthMethod(authMethod); - return postObjectImpl("/auth/otp", new ObjectRequest<>(request), OtpAuthenticationResponse.class); + return authenticateWithOtp(request); } /** @@ -2307,6 +2904,7 @@ public ObjectResponse authenticateWithOtp(String otpI * @param authMethod Authentication method used for operation update. * @return OTP authentication response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #authenticateWithOtp(OtpAuthenticationRequest) */ public ObjectResponse authenticateWithOtp(String otpId, String operationId, @NotNull String otpValue, boolean checkOnly, boolean updateOperation, AuthMethod authMethod) throws NextStepClientException { @@ -2317,6 +2915,17 @@ public ObjectResponse authenticateWithOtp(String otpI request.setCheckOnly(checkOnly); request.setUpdateOperation(updateOperation); request.setAuthMethod(authMethod); + return authenticateWithOtp(request); + } + + /** + * Authenticate using OTP with operation. + * + * @param request OTP authentication request. + * @return OTP authentication response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse authenticateWithOtp(@NotNull final OtpAuthenticationRequest request) throws NextStepClientException { return postObjectImpl("/auth/otp", new ObjectRequest<>(request), OtpAuthenticationResponse.class); } @@ -2328,13 +2937,14 @@ public ObjectResponse authenticateWithOtp(String otpI * @param credentialValue Credential value. * @return OTP authentication response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #authenticateWithCredential(CredentialAuthenticationRequest) */ public ObjectResponse authenticateWithCredential(@NotNull String credentialName, @NotNull String userId, @NotNull String credentialValue) throws NextStepClientException { final CredentialAuthenticationRequest request = new CredentialAuthenticationRequest(); request.setCredentialName(credentialName); request.setUserId(userId); request.setCredentialValue(credentialValue); - return postObjectImpl("/auth/credential", new ObjectRequest<>(request), CredentialAuthenticationResponse.class); + return authenticateWithCredential(request); } /** @@ -2347,6 +2957,7 @@ public ObjectResponse authenticateWithCredenti * @param credentialPositionsToVerify Credential positions to verify. * @return OTP authentication response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #authenticateWithCredential(CredentialAuthenticationRequest) */ public ObjectResponse authenticateWithCredential(@NotNull String credentialName, @NotNull String userId, @NotNull String credentialValue, CredentialAuthenticationMode authenticationMode, List credentialPositionsToVerify) throws NextStepClientException { @@ -2356,7 +2967,7 @@ public ObjectResponse authenticateWithCredenti request.setCredentialValue(credentialValue); request.setAuthenticationMode(authenticationMode); request.setCredentialPositionsToVerify(credentialPositionsToVerify); - return postObjectImpl("/auth/credential", new ObjectRequest<>(request), CredentialAuthenticationResponse.class); + return authenticateWithCredential(request); } /** @@ -2370,6 +2981,7 @@ public ObjectResponse authenticateWithCredenti * @param authMethod Authentication method used for operation update. * @return OTP authentication response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #authenticateWithCredential(CredentialAuthenticationRequest) */ public ObjectResponse authenticateWithCredential(@NotNull String credentialName, @NotNull String userId, @NotNull String credentialValue, String operationId, boolean updateOperation, AuthMethod authMethod) throws NextStepClientException { @@ -2380,7 +2992,7 @@ public ObjectResponse authenticateWithCredenti request.setOperationId(operationId); request.setUpdateOperation(updateOperation); request.setAuthMethod(authMethod); - return postObjectImpl("/auth/credential", new ObjectRequest<>(request), CredentialAuthenticationResponse.class); + return authenticateWithCredential(request); } /** @@ -2396,6 +3008,7 @@ public ObjectResponse authenticateWithCredenti * @param authMethod Authentication method used for operation update. * @return OTP authentication response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #authenticateWithCredential(CredentialAuthenticationRequest) */ public ObjectResponse authenticateWithCredential(@NotNull String credentialName, @NotNull String userId, @NotNull String credentialValue, CredentialAuthenticationMode authenticationMode, List credentialPositionsToVerify, @@ -2409,9 +3022,19 @@ public ObjectResponse authenticateWithCredenti request.setOperationId(operationId); request.setUpdateOperation(updateOperation); request.setAuthMethod(authMethod); - return postObjectImpl("/auth/credential", new ObjectRequest<>(request), CredentialAuthenticationResponse.class); + return authenticateWithCredential(request); } + /** + * Authenticate using credential. + * + * @param request Credential authentication request. + * @return OTP authentication response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse authenticateWithCredential(@NotNull final CredentialAuthenticationRequest request) throws NextStepClientException { + return postObjectImpl("/auth/credential", new ObjectRequest<>(request), CredentialAuthenticationResponse.class); + } /** * Authenticate using credential and OTP without operation. @@ -2423,6 +3046,7 @@ public ObjectResponse authenticateWithCredenti * @param otpValue OTP value. * @return OTP authentication response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #authenticateCombined(CombinedAuthenticationRequest) */ public ObjectResponse authenticateCombined(@NotNull String credentialName, @NotNull String userId, @NotNull String credentialValue, String otpId, @NotNull String otpValue) throws NextStepClientException { @@ -2432,7 +3056,7 @@ public ObjectResponse authenticateCombined(@NotN request.setCredentialValue(credentialValue); request.setOtpId(otpId); request.setOtpValue(otpValue); - return postObjectImpl("/auth/combined", new ObjectRequest<>(request), CombinedAuthenticationResponse.class); + return authenticateCombined(request); } /** @@ -2447,6 +3071,7 @@ public ObjectResponse authenticateCombined(@NotN * @param otpValue OTP value. * @return OTP authentication response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #authenticateCombined(CombinedAuthenticationRequest) */ public ObjectResponse authenticateCombined(@NotNull String credentialName, @NotNull String userId, @NotNull String credentialValue, CredentialAuthenticationMode authenticationMode, List credentialPositionsToVerify, @@ -2459,7 +3084,7 @@ public ObjectResponse authenticateCombined(@NotN request.setCredentialPositionsToVerify(credentialPositionsToVerify); request.setOtpId(otpId); request.setOtpValue(otpValue); - return postObjectImpl("/auth/combined", new ObjectRequest<>(request), CombinedAuthenticationResponse.class); + return authenticateCombined(request); } /** @@ -2475,6 +3100,7 @@ public ObjectResponse authenticateCombined(@NotN * @param authMethod Authentication method used for operation update. * @return OTP authentication response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #authenticateCombined(CombinedAuthenticationRequest) */ public ObjectResponse authenticateCombined(@NotNull String credentialName, @NotNull String userId, @NotNull String credentialValue, String otpId, String operationId, @NotNull String otpValue, @@ -2488,7 +3114,7 @@ public ObjectResponse authenticateCombined(@NotN request.setOtpValue(otpValue); request.setUpdateOperation(updateOperation); request.setAuthMethod(authMethod); - return postObjectImpl("/auth/combined", new ObjectRequest<>(request), CombinedAuthenticationResponse.class); + return authenticateCombined(request); } /** @@ -2506,6 +3132,7 @@ public ObjectResponse authenticateCombined(@NotN * @param authMethod Authentication method used for operation update. * @return OTP authentication response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #authenticateCombined(CombinedAuthenticationRequest) */ public ObjectResponse authenticateCombined(@NotNull String credentialName, @NotNull String userId, @NotNull String credentialValue, CredentialAuthenticationMode authenticationMode, List credentialPositionsToVerify, @@ -2522,6 +3149,17 @@ public ObjectResponse authenticateCombined(@NotN request.setOtpValue(otpValue); request.setUpdateOperation(updateOperation); request.setAuthMethod(authMethod); + return authenticateCombined(request); + } + + /** + * Authenticate using credential and OTP. + * + * @param request Combined authentication request. + * @return OTP authentication response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse authenticateCombined(@NotNull final CombinedAuthenticationRequest request) throws NextStepClientException { return postObjectImpl("/auth/combined", new ObjectRequest<>(request), CombinedAuthenticationResponse.class); } @@ -2534,11 +3172,23 @@ public ObjectResponse authenticateCombined(@NotN * @param data Audit log data. * @return Create audit log response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + * @see #createAudit(CreateAuditRequest) */ public ObjectResponse createAudit(@NotNull String action, String data) throws NextStepClientException { final CreateAuditRequest request = new CreateAuditRequest(); request.setAction(action); request.setData(data); + return createAudit(request); + } + + /** + * Create an audit log. + * + * @param request Create audit request. + * @return Create audit log response. + * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. + */ + public ObjectResponse createAudit(@NotNull final CreateAuditRequest request) throws NextStepClientException { return postObjectImpl("/audit", new ObjectRequest<>(request), CreateAuditResponse.class); } From 93f4b714c3dc330992d939ab2b1a7bbbd229b639 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Apr 2024 01:55:38 +0000 Subject: [PATCH 05/19] Bump bcprov-jdk18on.version from 1.78 to 1.78.1 Bumps `bcprov-jdk18on.version` from 1.78 to 1.78.1. Updates `org.bouncycastle:bcprov-jdk18on` from 1.78 to 1.78.1 - [Changelog](https://github.com/bcgit/bc-java/blob/main/docs/releasenotes.html) - [Commits](https://github.com/bcgit/bc-java/commits) Updates `org.bouncycastle:bcpkix-jdk18on` from 1.78 to 1.78.1 - [Changelog](https://github.com/bcgit/bc-java/blob/main/docs/releasenotes.html) - [Commits](https://github.com/bcgit/bc-java/commits) --- updated-dependencies: - dependency-name: org.bouncycastle:bcprov-jdk18on dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: org.bouncycastle:bcpkix-jdk18on dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a22d592da..3c0b2640c 100644 --- a/pom.xml +++ b/pom.xml @@ -91,7 +91,7 @@ UTF-8 17 17 - 1.78 + 1.78.1 3.5.3 1.6.4 From c1739f5d1ab1011d0be7d1ed05d12460eafd50fb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Apr 2024 01:56:03 +0000 Subject: [PATCH 06/19] Bump org.springframework.boot:spring-boot-starter-parent Bumps [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) from 3.2.4 to 3.2.5. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.4...v3.2.5) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter-parent dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a22d592da..df7d2adea 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 3.2.4 + 3.2.5 From 70bc4502ea476f9664f3674a4e481bffc110c33a Mon Sep 17 00:00:00 2001 From: Lubos Racansky Date: Mon, 29 Apr 2024 09:31:58 +0200 Subject: [PATCH 07/19] Fix #1634: Improve WildFly documentation and configuration --- docs/Deploying-Wildfly.md | 30 +++++++------------ powerauth-nextstep/pom.xml | 13 -------- .../src/main/resources/application.properties | 3 ++ .../WEB-INF/jboss-deployment-structure.xml | 7 +---- .../src/main/resources/application.properties | 3 ++ .../WEB-INF/jboss-deployment-structure.xml | 2 +- .../src/main/resources/application.properties | 3 ++ .../WEB-INF/jboss-deployment-structure.xml | 2 +- powerauth-webflow/pom.xml | 13 -------- .../src/main/resources/application.properties | 3 ++ .../WEB-INF/jboss-deployment-structure.xml | 7 +---- 11 files changed, 27 insertions(+), 59 deletions(-) diff --git a/docs/Deploying-Wildfly.md b/docs/Deploying-Wildfly.md index f9bc26b9c..8497b3a41 100644 --- a/docs/Deploying-Wildfly.md +++ b/docs/Deploying-Wildfly.md @@ -12,7 +12,7 @@ Web Flow contains the following configuration in `jboss-deployment-structure.xml ``` - + @@ -23,11 +23,6 @@ Web Flow contains the following configuration in `jboss-deployment-structure.xml - - - - - @@ -36,7 +31,7 @@ Web Flow contains the following configuration in `jboss-deployment-structure.xml Similarly, Next Step contains the following configuration in `jboss-deployment-structure.xml` file for JBoss / Wildfly: ``` - + @@ -47,11 +42,6 @@ Similarly, Next Step contains the following configuration in `jboss-deployment-s - - - - - @@ -60,7 +50,7 @@ Similarly, Next Step contains the following configuration in `jboss-deployment-s Optionally, TPP engine contains the following configuration in `jboss-deployment-structure.xml` file for JBoss / Wildfly: ``` - + @@ -79,7 +69,7 @@ Optionally, Web Flow Client contains the following configuration in `jboss-deplo ``` - + @@ -10,11 +10,6 @@ - - - - - diff --git a/powerauth-tpp-engine/src/main/resources/application.properties b/powerauth-tpp-engine/src/main/resources/application.properties index ce153d664..b7c270a29 100644 --- a/powerauth-tpp-engine/src/main/resources/application.properties +++ b/powerauth-tpp-engine/src/main/resources/application.properties @@ -45,3 +45,6 @@ logging.config=${POWERAUTH_TPP_ENGINE_LOGGING:} # Monitoring management.tracing.sampling.probability=1.0 + +spring.autoconfigure.exclude=\ + org.springframework.boot.actuate.autoconfigure.metrics.jersey.JerseyServerMetricsAutoConfiguration diff --git a/powerauth-tpp-engine/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/powerauth-tpp-engine/src/main/webapp/WEB-INF/jboss-deployment-structure.xml index 9d77e6675..dfc6f1a59 100644 --- a/powerauth-tpp-engine/src/main/webapp/WEB-INF/jboss-deployment-structure.xml +++ b/powerauth-tpp-engine/src/main/webapp/WEB-INF/jboss-deployment-structure.xml @@ -1,5 +1,5 @@ - + diff --git a/powerauth-webflow-client/src/main/resources/application.properties b/powerauth-webflow-client/src/main/resources/application.properties index 9eb804cbf..69a78c1f3 100644 --- a/powerauth-webflow-client/src/main/resources/application.properties +++ b/powerauth-webflow-client/src/main/resources/application.properties @@ -41,3 +41,6 @@ logging.config=${POWERAUTH_WEBFLOW_CLIENT_LOGGING:} # Monitoring management.tracing.sampling.probability=1.0 + +spring.autoconfigure.exclude=\ + org.springframework.boot.actuate.autoconfigure.metrics.jersey.JerseyServerMetricsAutoConfiguration diff --git a/powerauth-webflow-client/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/powerauth-webflow-client/src/main/webapp/WEB-INF/jboss-deployment-structure.xml index c051d0ad5..4a5b99ae5 100644 --- a/powerauth-webflow-client/src/main/webapp/WEB-INF/jboss-deployment-structure.xml +++ b/powerauth-webflow-client/src/main/webapp/WEB-INF/jboss-deployment-structure.xml @@ -1,5 +1,5 @@ - + @@ -10,11 +10,6 @@ - - - - - From df72894e9c235f2bd7347be5f0f70bd05e3906be Mon Sep 17 00:00:00 2001 From: Jan Dusil <134381434+jandusil@users.noreply.github.com> Date: Mon, 6 May 2024 14:14:28 +0200 Subject: [PATCH 08/19] Fix #1636: For API /auth/combinded assert credentialName (#1637) * Fix #1636: For API /auth/combinded assert credentialName - remove credentialName completely from combined auth - add migration docs - update API ref - remove param from java doc --- docs/Migration-Instructions.md | 1 + docs/Next-Step-Server-REST-API-Reference.md | 1 - docs/Web-Flow-1.8.0.md | 10 ++++++++++ .../lib/nextstep/client/NextStepClient.java | 16 ++++----------- .../CombinedAuthenticationRequest.java | 3 --- .../service/AuthenticationService.java | 7 +++++-- .../nextstep/NextStepAuthenticationTest.java | 20 +++++++++---------- .../SmsAuthorizationController.java | 3 +-- 8 files changed, 31 insertions(+), 30 deletions(-) create mode 100644 docs/Web-Flow-1.8.0.md diff --git a/docs/Migration-Instructions.md b/docs/Migration-Instructions.md index 5a054b15a..50e22cd23 100644 --- a/docs/Migration-Instructions.md +++ b/docs/Migration-Instructions.md @@ -2,6 +2,7 @@ This page contains PowerAuth Web Flow migration instructions. +- [PowerAuth Web Flow 1.8.0](./Web-Flow-1.8.0.md) - [PowerAuth Web Flow 1.7.0](./Web-Flow-1.7.0.md) - [PowerAuth Web Flow 1.6.0](./Web-Flow-1.6.0.md) - [PowerAuth Web Flow 1.5.0](./Web-Flow-1.5.0.md) diff --git a/docs/Next-Step-Server-REST-API-Reference.md b/docs/Next-Step-Server-REST-API-Reference.md index 3d3806916..006457ace 100644 --- a/docs/Next-Step-Server-REST-API-Reference.md +++ b/docs/Next-Step-Server-REST-API-Reference.md @@ -8823,7 +8823,6 @@ The list of expected status codes: ```json { "requestObject": { - "credentialName": "RETAIL_CREDENTIAL", "userId": "test1234", "credentialValue": ")wOI6ijUkwYI", "authenticationMode": "MATCH_EXACT", diff --git a/docs/Web-Flow-1.8.0.md b/docs/Web-Flow-1.8.0.md new file mode 100644 index 000000000..e2055ce85 --- /dev/null +++ b/docs/Web-Flow-1.8.0.md @@ -0,0 +1,10 @@ +# Migration from 1.7.0 to 1.8.0 + +This guide contains instructions for migration from PowerAuth WebFlow version `1.7.x` to version `1.8.0`. + +## API + +### Attribute `credentialName` modification + +The attribute `credentialName` has been removed from the request object of the API endpoint `/auth/combined`. This change +was made because the attribute was not utilized in the underlying functionality. diff --git a/powerauth-nextstep-client/src/main/java/io/getlime/security/powerauth/lib/nextstep/client/NextStepClient.java b/powerauth-nextstep-client/src/main/java/io/getlime/security/powerauth/lib/nextstep/client/NextStepClient.java index 8dc2477b2..f5749264d 100644 --- a/powerauth-nextstep-client/src/main/java/io/getlime/security/powerauth/lib/nextstep/client/NextStepClient.java +++ b/powerauth-nextstep-client/src/main/java/io/getlime/security/powerauth/lib/nextstep/client/NextStepClient.java @@ -2416,7 +2416,6 @@ public ObjectResponse authenticateWithCredenti /** * Authenticate using credential and OTP without operation. * - * @param credentialName Credential name. * @param userId User ID. * @param credentialValue Credential value. * @param otpId OTP ID. @@ -2424,10 +2423,9 @@ public ObjectResponse authenticateWithCredenti * @return OTP authentication response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. */ - public ObjectResponse authenticateCombined(@NotNull String credentialName, @NotNull String userId, @NotNull String credentialValue, + public ObjectResponse authenticateCombined(@NotNull String userId, @NotNull String credentialValue, String otpId, @NotNull String otpValue) throws NextStepClientException { final CombinedAuthenticationRequest request = new CombinedAuthenticationRequest(); - request.setCredentialName(credentialName); request.setUserId(userId); request.setCredentialValue(credentialValue); request.setOtpId(otpId); @@ -2438,7 +2436,6 @@ public ObjectResponse authenticateCombined(@NotN /** * Authenticate using credential and OTP without operation and with additional details. * - * @param credentialName Credential name. * @param userId User ID. * @param credentialValue Credential value. * @param authenticationMode Authentication mode. @@ -2448,11 +2445,10 @@ public ObjectResponse authenticateCombined(@NotN * @return OTP authentication response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. */ - public ObjectResponse authenticateCombined(@NotNull String credentialName, @NotNull String userId, @NotNull String credentialValue, + public ObjectResponse authenticateCombined(@NotNull String userId, @NotNull String credentialValue, CredentialAuthenticationMode authenticationMode, List credentialPositionsToVerify, String otpId, @NotNull String otpValue) throws NextStepClientException { final CombinedAuthenticationRequest request = new CombinedAuthenticationRequest(); - request.setCredentialName(credentialName); request.setUserId(userId); request.setCredentialValue(credentialValue); request.setAuthenticationMode(authenticationMode); @@ -2465,7 +2461,6 @@ public ObjectResponse authenticateCombined(@NotN /** * Authenticate using credential and OTP with operation. * - * @param credentialName Credential name. * @param userId User ID. * @param credentialValue Credential value. * @param otpId OTP ID. @@ -2476,11 +2471,10 @@ public ObjectResponse authenticateCombined(@NotN * @return OTP authentication response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. */ - public ObjectResponse authenticateCombined(@NotNull String credentialName, @NotNull String userId, @NotNull String credentialValue, + public ObjectResponse authenticateCombined(@NotNull String userId, @NotNull String credentialValue, String otpId, String operationId, @NotNull String otpValue, boolean updateOperation, AuthMethod authMethod) throws NextStepClientException { final CombinedAuthenticationRequest request = new CombinedAuthenticationRequest(); - request.setCredentialName(credentialName); request.setUserId(userId); request.setCredentialValue(credentialValue); request.setOtpId(otpId); @@ -2494,7 +2488,6 @@ public ObjectResponse authenticateCombined(@NotN /** * Authenticate using credential and OTP with operation and with additional details. * - * @param credentialName Credential name. * @param userId User ID. * @param credentialValue Credential value. * @param authenticationMode Authentication mode. @@ -2507,12 +2500,11 @@ public ObjectResponse authenticateCombined(@NotN * @return OTP authentication response. * @throws NextStepClientException Thrown when REST API call fails, including {@link ErrorResponse} with error code. */ - public ObjectResponse authenticateCombined(@NotNull String credentialName, @NotNull String userId, @NotNull String credentialValue, + public ObjectResponse authenticateCombined(@NotNull String userId, @NotNull String credentialValue, CredentialAuthenticationMode authenticationMode, List credentialPositionsToVerify, String otpId, String operationId, @NotNull String otpValue, boolean updateOperation, AuthMethod authMethod) throws NextStepClientException { final CombinedAuthenticationRequest request = new CombinedAuthenticationRequest(); - request.setCredentialName(credentialName); request.setUserId(userId); request.setCredentialValue(credentialValue); request.setAuthenticationMode(authenticationMode); diff --git a/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CombinedAuthenticationRequest.java b/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CombinedAuthenticationRequest.java index 6cd478b20..1e5c4ce6e 100644 --- a/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CombinedAuthenticationRequest.java +++ b/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CombinedAuthenticationRequest.java @@ -34,9 +34,6 @@ @Data public class CombinedAuthenticationRequest { - @NotBlank - @Size(min = 2, max = 256) - private String credentialName; @NotBlank @Size(min = 1, max = 256) private String userId; diff --git a/powerauth-nextstep/src/main/java/io/getlime/security/powerauth/app/nextstep/service/AuthenticationService.java b/powerauth-nextstep/src/main/java/io/getlime/security/powerauth/app/nextstep/service/AuthenticationService.java index 49fb6bed0..8d2002a61 100644 --- a/powerauth-nextstep/src/main/java/io/getlime/security/powerauth/app/nextstep/service/AuthenticationService.java +++ b/powerauth-nextstep/src/main/java/io/getlime/security/powerauth/app/nextstep/service/AuthenticationService.java @@ -551,6 +551,9 @@ public CombinedAuthenticationResponse authenticateCombined(CombinedAuthenticatio final IdGeneratorService idGeneratorService = serviceCatalogue.getIdGeneratorService(); final OtpEntity otp = otpService.findOtp(request.getOtpId(), request.getOperationId()); + if (otp.getCredentialDefinition() == null || otp.getCredentialDefinition().getName() == null) { + throw new InvalidRequestException("Credential definition is not set for operation with OTP Id and Operation Id: " + request.getOtpId() + ", " + request.getOperationId()); + } if (otp.getOtpDefinition().isDataAdapterProxyEnabled()) { logger.info("Combined authentication proxied through Data Adapter, OTP ID: {}", request.getOtpId()); return authenticateCombinedCustom(otp.getCredentialDefinition(), otp.getOtpId(), request.getOtpValue(), request.getCredentialValue(), otp.getOperation().getOperationId(), otp.getUserId(), request.getAuthMethod()); @@ -577,10 +580,10 @@ public CombinedAuthenticationResponse authenticateCombined(CombinedAuthenticatio operation = operationPersistenceService.getOperation(request.getOperationId()); } if (request.isUpdateOperation() && operation == null) { - throw new InvalidRequestException("Operation not found, however operation update requested for credential and OTP: " + request.getCredentialName() + ", " + otp.getOtpDefinition().getName()); + throw new InvalidRequestException("Operation not found, however operation update requested for credential and OTP: " + otp.getCredentialDefinition().getName() + ", " + otp.getOtpDefinition().getName()); } if (request.getOperationId() != null && !request.getOperationId().equals(otp.getOperation().getOperationId())) { - throw new InvalidRequestException("Operation ID mismatch for credential and OTP: " + request.getCredentialName() + ", " + otp.getOtpDefinition().getName()); + throw new InvalidRequestException("Operation ID mismatch for credential and OTP: " + otp.getCredentialDefinition().getName() + ", " + otp.getOtpDefinition().getName()); } final CredentialEntity credential = credentialService.findCredential(otp.getCredentialDefinition(), user); final CredentialDefinitionEntity credentialDefinition = credential.getCredentialDefinition(); diff --git a/powerauth-nextstep/src/test/java/io/getlime/security/powerauth/app/nextstep/NextStepAuthenticationTest.java b/powerauth-nextstep/src/test/java/io/getlime/security/powerauth/app/nextstep/NextStepAuthenticationTest.java index 216ca1bf8..774fd626a 100644 --- a/powerauth-nextstep/src/test/java/io/getlime/security/powerauth/app/nextstep/NextStepAuthenticationTest.java +++ b/powerauth-nextstep/src/test/java/io/getlime/security/powerauth/app/nextstep/NextStepAuthenticationTest.java @@ -283,7 +283,7 @@ public void testCredentialFailUnknownUser() { @Test public void testCredentialAndOtpSuccessNoOperation() throws NextStepClientException { CreateOtpResponse r1 = nextStepClient.createOtp("test_user_1", "TEST_OTP", "TEST_CREDENTIAL", "TEST_DATA").getResponseObject(); - CombinedAuthenticationResponse r2 = nextStepClient.authenticateCombined("TEST_CREDENTIAL", "test_user_1", "s3cret", r1.getOtpId(), r1.getOtpValue()).getResponseObject(); + CombinedAuthenticationResponse r2 = nextStepClient.authenticateCombined("test_user_1", "s3cret", r1.getOtpId(), r1.getOtpValue()).getResponseObject(); assertEquals(AuthenticationResult.SUCCEEDED, r2.getAuthenticationResult()); } @@ -291,7 +291,7 @@ public void testCredentialAndOtpSuccessNoOperation() throws NextStepClientExcept public void testCredentialAndOtpSuccessWithOperation() throws NextStepClientException { nextStepClient.createOperation("auth_otp", "test_operation_8", "A1", null, null); CreateOtpResponse r1 = nextStepClient.createOtp("test_user_1", "TEST_OTP", "TEST_CREDENTIAL", "TEST_DATA", "test_operation_8").getResponseObject(); - CombinedAuthenticationResponse r2 = nextStepClient.authenticateCombined("TEST_CREDENTIAL", "test_user_1", "s3cret", r1.getOtpId(), "test_operation_8", r1.getOtpValue(), true, null).getResponseObject(); + CombinedAuthenticationResponse r2 = nextStepClient.authenticateCombined("test_user_1", "s3cret", r1.getOtpId(), "test_operation_8", r1.getOtpValue(), true, null).getResponseObject(); assertEquals(AuthenticationResult.SUCCEEDED, r2.getAuthenticationResult()); GetOperationDetailResponse r3 = nextStepClient.getOperationDetail("test_operation_8").getResponseObject(); assertEquals(AuthResult.DONE, r3.getResult()); @@ -300,7 +300,7 @@ public void testCredentialAndOtpSuccessWithOperation() throws NextStepClientExce @Test public void testCredentialAndOtpFailNoOperation1() throws NextStepClientException { CreateOtpResponse r1 = nextStepClient.createOtp("test_user_1", "TEST_OTP", "TEST_CREDENTIAL", "TEST_DATA").getResponseObject(); - CombinedAuthenticationResponse r2 = nextStepClient.authenticateCombined("TEST_CREDENTIAL", "test_user_1", "secret", r1.getOtpId(), r1.getOtpValue()).getResponseObject(); + CombinedAuthenticationResponse r2 = nextStepClient.authenticateCombined("test_user_1", "secret", r1.getOtpId(), r1.getOtpValue()).getResponseObject(); assertEquals(AuthenticationResult.FAILED, r2.getAuthenticationResult()); assertEquals(AuthenticationResult.FAILED, r2.getCredentialAuthenticationResult()); assertEquals(AuthenticationResult.SUCCEEDED, r2.getOtpAuthenticationResult()); @@ -309,7 +309,7 @@ public void testCredentialAndOtpFailNoOperation1() throws NextStepClientExceptio @Test public void testCredentialAndOtpFailNoOperation2() throws NextStepClientException { CreateOtpResponse r1 = nextStepClient.createOtp("test_user_1", "TEST_OTP", "TEST_CREDENTIAL", "TEST_DATA").getResponseObject(); - CombinedAuthenticationResponse r2 = nextStepClient.authenticateCombined("TEST_CREDENTIAL", "test_user_1", "s3cret", r1.getOtpId(), "0000000000").getResponseObject(); + CombinedAuthenticationResponse r2 = nextStepClient.authenticateCombined("test_user_1", "s3cret", r1.getOtpId(), "0000000000").getResponseObject(); assertEquals(AuthenticationResult.FAILED, r2.getAuthenticationResult()); assertEquals(AuthenticationResult.SUCCEEDED, r2.getCredentialAuthenticationResult()); assertEquals(AuthenticationResult.FAILED, r2.getOtpAuthenticationResult()); @@ -319,7 +319,7 @@ public void testCredentialAndOtpFailNoOperation2() throws NextStepClientExceptio public void testCredentialAndOtpFailWithOperation1() throws NextStepClientException { nextStepClient.createOperation("auth_otp", "test_operation_9a", "A1", null, null); CreateOtpResponse r1 = nextStepClient.createOtp("test_user_1", "TEST_OTP", "TEST_CREDENTIAL", "TEST_DATA", "test_operation_9a").getResponseObject(); - CombinedAuthenticationResponse r2 = nextStepClient.authenticateCombined("TEST_CREDENTIAL", "test_user_1", "secret", r1.getOtpId(), "test_operation_9a", r1.getOtpValue(), true, null).getResponseObject(); + CombinedAuthenticationResponse r2 = nextStepClient.authenticateCombined("test_user_1", "secret", r1.getOtpId(), "test_operation_9a", r1.getOtpValue(), true, null).getResponseObject(); assertEquals(AuthenticationResult.FAILED, r2.getAuthenticationResult()); assertEquals(AuthenticationResult.FAILED, r2.getCredentialAuthenticationResult()); assertEquals(AuthenticationResult.SUCCEEDED, r2.getOtpAuthenticationResult()); @@ -331,7 +331,7 @@ public void testCredentialAndOtpFailWithOperation1() throws NextStepClientExcept public void testCredentialAndOtpFailWithOperation2() throws NextStepClientException { nextStepClient.createOperation("auth_otp", "test_operation_9b", "A1", null, null); CreateOtpResponse r1 = nextStepClient.createOtp("test_user_1", "TEST_OTP", "TEST_CREDENTIAL", "TEST_DATA", "test_operation_9b").getResponseObject(); - CombinedAuthenticationResponse r2 = nextStepClient.authenticateCombined("TEST_CREDENTIAL", "test_user_1", "s3cret", r1.getOtpId(), "test_operation_9b", "0000000000", true, null).getResponseObject(); + CombinedAuthenticationResponse r2 = nextStepClient.authenticateCombined("test_user_1", "s3cret", r1.getOtpId(), "test_operation_9b", "0000000000", true, null).getResponseObject(); assertEquals(AuthenticationResult.FAILED, r2.getAuthenticationResult()); assertEquals(AuthenticationResult.SUCCEEDED, r2.getCredentialAuthenticationResult()); assertEquals(AuthenticationResult.FAILED, r2.getOtpAuthenticationResult()); @@ -416,9 +416,9 @@ public void testCredentialVerifyBlockedUser() throws NextStepClientException { @Test public void testOtpAndCredentialVerifyBlockedUser() throws NextStepClientException { - CreateOtpResponse r1 = nextStepClient.createOtp("test_user_1", "TEST_OTP", null, "TEST_DATA").getResponseObject(); + CreateOtpResponse r1 = nextStepClient.createOtp("test_user_1", "TEST_OTP", "TEST_CREDENTIAL", "TEST_DATA").getResponseObject(); nextStepClient.blockUser("test_user_1"); - CombinedAuthenticationResponse r2 = nextStepClient.authenticateCombined("TEST_CREDENTIAL", "test_user_1", "s3cret", r1.getOtpId(), r1.getOtpValue()).getResponseObject(); + CombinedAuthenticationResponse r2 = nextStepClient.authenticateCombined("test_user_1", "s3cret", r1.getOtpId(), r1.getOtpValue()).getResponseObject(); assertEquals(UserIdentityStatus.BLOCKED, r2.getUserIdentityStatus()); assertEquals(AuthenticationResult.FAILED, r2.getAuthenticationResult()); assertEquals(AuthenticationResult.FAILED, r2.getOtpAuthenticationResult()); @@ -534,7 +534,7 @@ public void testOperationMaxAuthFailsCombined() throws NextStepClientException { nextStepClient.createOperation("auth_otp", "test_operation_11", "A1", null, null); for (int i = 0; i < 4; i++) { nextStepClient.createOtp("test_user_1", "TEST_OTP", "TEST_CREDENTIAL", "TEST_DATA", "test_operation_11"); - CombinedAuthenticationResponse r1 = nextStepClient.authenticateCombined("TEST_CREDENTIAL", "test_user_1", "secret", null, "test_operation_11", "0000000000", true, null).getResponseObject(); + CombinedAuthenticationResponse r1 = nextStepClient.authenticateCombined("test_user_1", "secret", null, "test_operation_11", "0000000000", true, null).getResponseObject(); assertEquals(AuthenticationResult.FAILED, r1.getAuthenticationResult()); if (i < 3) { // 2 attempts for OTP, 2 attempts for credential @@ -549,7 +549,7 @@ public void testOperationMaxAuthFailsCombined() throws NextStepClientException { nextStepClient.updateCredentialCounter("test_user_1", "TEST_CREDENTIAL", AuthenticationResult.SUCCEEDED); } // Operation status changes to FAILED due to 5th failed attempt - CombinedAuthenticationResponse r1 = nextStepClient.authenticateCombined("TEST_CREDENTIAL", "test_user_1", "secret", null, "test_operation_11", "0000000000", true, null).getResponseObject(); + CombinedAuthenticationResponse r1 = nextStepClient.authenticateCombined("test_user_1", "secret", null, "test_operation_11", "0000000000", true, null).getResponseObject(); assertEquals(0, (int) r1.getRemainingAttempts()); assertTrue(r1.isOperationFailed()); assertEquals(AuthenticationResult.FAILED, r1.getAuthenticationResult()); diff --git a/powerauth-webflow-authentication-sms/src/main/java/io/getlime/security/powerauth/lib/webflow/authentication/sms/controller/SmsAuthorizationController.java b/powerauth-webflow-authentication-sms/src/main/java/io/getlime/security/powerauth/lib/webflow/authentication/sms/controller/SmsAuthorizationController.java index 6b42c46f6..5012b8c89 100644 --- a/powerauth-webflow-authentication-sms/src/main/java/io/getlime/security/powerauth/lib/webflow/authentication/sms/controller/SmsAuthorizationController.java +++ b/powerauth-webflow-authentication-sms/src/main/java/io/getlime/security/powerauth/lib/webflow/authentication/sms/controller/SmsAuthorizationController.java @@ -137,7 +137,6 @@ protected AuthResultDetail authenticate(SmsAuthorizationRequest request) throws final String otpId = getOtpIdFromHttpSession(); GetOrganizationDetailResponse organization = nextStepClient.getOrganizationDetail(operation.getOrganizationId()).getResponseObject(); String otpName = organization.getDefaultOtpName(); - String credentialName = organization.getDefaultCredentialName(); if (otpName == null) { logger.warn("Default OTP name is not configured for organization: " + operation.getOrganizationId()); throw new AuthStepException("SMS delivery failed", "error.communication"); @@ -217,7 +216,7 @@ protected AuthResultDetail authenticate(SmsAuthorizationRequest request) throws } String protectedPassword = passwordProtection.protect(request.getPassword()); - CombinedAuthenticationResponse authResponse = nextStepClient.authenticateCombined(credentialName, userId, protectedPassword, otpId, operationId, authCode, true, authMethod).getResponseObject(); + CombinedAuthenticationResponse authResponse = nextStepClient.authenticateCombined(userId, protectedPassword, otpId, operationId, authCode, true, authMethod).getResponseObject(); if (authResponse.isOperationFailed()) { logger.info("Step authentication maximum attempts reached for credential and OTP verification (2FA) due to failed operation, operation ID: {}, authentication method: {}", operation.getOperationId(), authMethod); throw new MaxAttemptsExceededException("Maximum number of authentication attempts exceeded"); From fc9a946da5e26ad1860fa4812ea828457f87cfdb Mon Sep 17 00:00:00 2001 From: Lubos Racansky Date: Thu, 9 May 2024 09:16:28 +0200 Subject: [PATCH 09/19] Fix #1639: Extract duplicity in AuthenticationService --- .../service/AuthenticationService.java | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/powerauth-nextstep/src/main/java/io/getlime/security/powerauth/app/nextstep/service/AuthenticationService.java b/powerauth-nextstep/src/main/java/io/getlime/security/powerauth/app/nextstep/service/AuthenticationService.java index 8d2002a61..0aa9f478e 100644 --- a/powerauth-nextstep/src/main/java/io/getlime/security/powerauth/app/nextstep/service/AuthenticationService.java +++ b/powerauth-nextstep/src/main/java/io/getlime/security/powerauth/app/nextstep/service/AuthenticationService.java @@ -42,6 +42,7 @@ import io.getlime.security.powerauth.lib.nextstep.model.exception.*; import io.getlime.security.powerauth.lib.nextstep.model.request.*; import io.getlime.security.powerauth.lib.nextstep.model.response.*; +import jakarta.validation.constraints.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -421,19 +422,12 @@ public OtpAuthenticationResponse authenticateWithOtp(OtpAuthenticationRequest re } } - final Integer remainingAttempts = resolveRemainingAttempts(credential, otp, operation); - if (Integer.valueOf(0).equals(remainingAttempts) && otp.getStatus() == OtpStatus.ACTIVE) { - logger.debug("OTP was blocked because there are no remaining attempts left, OTP ID: {}", otp.getOtpId()); - otp.setStatus(OtpStatus.BLOCKED); - otp.setTimestampBlocked(new Date()); - // OTP was updated, save authentication with OTP - authenticationRepository.save(authentication); - } + final Integer remainingAttempts = resolveRemainingAttemptsAndBlockOtpIfNeeded(credential, otp, operation, authentication); final String mode = checkOnly ? "check" : "authentication"; - logger.info("OTP " + mode + " result: {}, remaining attempts: {}, user ID: {}, user identity status: {}, OTP status: {}, credential status: {}, operation failed: {}", - authenticationResult, remainingAttempts, user == null ? null : user.getUserId(), user == null ? null : user.getStatus(), otp.getStatus(), credential == null ? null : credential.getStatus(), operationFailed); + logger.info("OTP {} result: {}, remaining attempts: {}, user ID: {}, user identity status: {}, OTP status: {}, credential status: {}, operation failed: {}", + mode, authenticationResult, remainingAttempts, user == null ? null : user.getUserId(), user == null ? null : user.getStatus(), otp.getStatus(), credential == null ? null : credential.getStatus(), operationFailed); audit.info("OTP authentication result", AuditDetail.builder() .type(AUDIT_TYPE_AUTHENTICATION) .param("userId", user != null ? user.getUserId() : null) @@ -669,14 +663,7 @@ public CombinedAuthenticationResponse authenticateCombined(CombinedAuthenticatio } } - final Integer remainingAttempts = resolveRemainingAttempts(credential, otp, operation); - if (Integer.valueOf(0).equals(remainingAttempts) && otp.getStatus() == OtpStatus.ACTIVE) { - logger.debug("OTP was blocked because there are no remaining attempts left, OTP ID: {}", otp.getOtpId()); - otp.setStatus(OtpStatus.BLOCKED); - otp.setTimestampBlocked(new Date()); - // OTP was updated, save authentication with OTP - authenticationRepository.save(authentication); - } + final Integer remainingAttempts = resolveRemainingAttemptsAndBlockOtpIfNeeded(credential, otp, operation, authentication); logger.info("Combined authentication result: {}, credential authentication result: {}, OTP authentication result: {}, remaining attempts: {}, user ID: {}, user identity status: {}, OTP status: {}, credential status: {}, operation failed: {}", authenticationResult, credentialAuthenticationResult, otpAuthenticationResult, remainingAttempts, user.getUserId(), user.getStatus(), otp.getStatus(), credential.getStatus(), operationFailed); @@ -981,6 +968,18 @@ private UpdateOperationResponse updateOperation(String userId, OperationEntity o } } + private Integer resolveRemainingAttemptsAndBlockOtpIfNeeded(final CredentialEntity credential, final @NotNull OtpEntity otp, final OperationEntity operation, final AuthenticationEntity authentication) { + final Integer remainingAttempts = resolveRemainingAttempts(credential, otp, operation); + if (Integer.valueOf(0).equals(remainingAttempts) && otp.getStatus() == OtpStatus.ACTIVE) { + logger.debug("OTP was blocked because there are no remaining attempts left, OTP ID: {}", otp.getOtpId()); + otp.setStatus(OtpStatus.BLOCKED); + otp.setTimestampBlocked(new Date()); + // OTP was updated, save authentication with OTP + authenticationRepository.save(authentication); + } + return remainingAttempts; + } + /** * Resolve remaining attempts for a credential entity, OTP entity and operation. * @param credential Credential entity or null for no credential. From 79a1f5e39ad86eff27e6e6a0dda4b969f10387d0 Mon Sep 17 00:00:00 2001 From: Lubos Racansky Date: Thu, 16 May 2024 08:58:50 +0200 Subject: [PATCH 10/19] Add dependabot configuration for github-actions --- .github/dependabot.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 14652100a..0f75d3360 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -22,3 +22,11 @@ updates: labels: - "npm" - "dependencies" + - package-ecosystem: "github-actions" + # Workflow files stored in the default location of `.github/workflows`. (You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.) + directory: "/" + schedule: + interval: "weekly" + labels: + - "github-actions" + - "dependencies" From 71b7f9bc25a3bd63767cfc98a3f7e4cbd10ddb44 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 09:06:02 +0000 Subject: [PATCH 11/19] Bump io.swagger.core.v3:swagger-annotations-jakarta Bumps io.swagger.core.v3:swagger-annotations-jakarta from 2.2.21 to 2.2.22. --- updated-dependencies: - dependency-name: io.swagger.core.v3:swagger-annotations-jakarta dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ed47db1b9..b0e0c1af4 100644 --- a/pom.xml +++ b/pom.xml @@ -97,7 +97,7 @@ 2.5.0 - 2.2.21 + 2.2.22 1.4.4 20240325.1 From 9d666789068da2bb64a95b40602048448c927f09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 01:44:41 +0000 Subject: [PATCH 12/19] Bump org.springframework.boot:spring-boot-starter-parent Bumps [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) from 3.2.5 to 3.3.0. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.5...v3.3.0) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter-parent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b0e0c1af4..803d1e8dd 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 3.2.5 + 3.3.0 From e5db026007cacbc68d3c0ec0fa6f0c4f686fb322 Mon Sep 17 00:00:00 2001 From: Lubos Racansky Date: Thu, 30 May 2024 15:26:28 +0200 Subject: [PATCH 13/19] Fix #1644: Name Hikari Pool --- powerauth-nextstep/src/main/resources/application.properties | 1 + powerauth-tpp-engine/src/main/resources/application.properties | 1 + powerauth-webflow/src/main/resources/application.properties | 1 + 3 files changed, 3 insertions(+) diff --git a/powerauth-nextstep/src/main/resources/application.properties b/powerauth-nextstep/src/main/resources/application.properties index 0475b1923..8b9e8d76c 100644 --- a/powerauth-nextstep/src/main/resources/application.properties +++ b/powerauth-nextstep/src/main/resources/application.properties @@ -6,6 +6,7 @@ spring.datasource.url=jdbc:postgresql://localhost:5432/powerauth spring.datasource.username=powerauth spring.datasource.password= spring.datasource.hikari.auto-commit=false +spring.datasource.hikari.pool-name=HikariPool-NextStep spring.jpa.properties.hibernate.connection.characterEncoding=utf8 spring.jpa.properties.hibernate.connection.useUnicode=true diff --git a/powerauth-tpp-engine/src/main/resources/application.properties b/powerauth-tpp-engine/src/main/resources/application.properties index b7c270a29..ef04eb9e9 100644 --- a/powerauth-tpp-engine/src/main/resources/application.properties +++ b/powerauth-tpp-engine/src/main/resources/application.properties @@ -6,6 +6,7 @@ spring.datasource.url=jdbc:postgresql://localhost:5432/powerauth spring.datasource.username=powerauth spring.datasource.password= spring.datasource.hikari.auto-commit=false +spring.datasource.hikari.pool-name=HikariPool-TPP-Engine spring.jpa.properties.hibernate.connection.characterEncoding=utf8 spring.jpa.properties.hibernate.connection.useUnicode=true diff --git a/powerauth-webflow/src/main/resources/application.properties b/powerauth-webflow/src/main/resources/application.properties index 011bae392..39d30c356 100644 --- a/powerauth-webflow/src/main/resources/application.properties +++ b/powerauth-webflow/src/main/resources/application.properties @@ -28,6 +28,7 @@ spring.datasource.url=jdbc:postgresql://localhost:5432/powerauth spring.datasource.username=powerauth spring.datasource.password= spring.datasource.hikari.auto-commit=false +spring.datasource.hikari.pool-name=HikariPool-WebFlow spring.jpa.properties.hibernate.connection.characterEncoding=utf8 spring.jpa.properties.hibernate.connection.useUnicode=true From 276c8261aae07597d0f059702661f49273ca996c Mon Sep 17 00:00:00 2001 From: Lubos Racansky Date: Tue, 11 Jun 2024 13:11:59 +0200 Subject: [PATCH 14/19] Fix #1647: Configure timeouts for REST clients --- docs/Web-Flow-Configuration.md | 6 +++ .../NextStepServerConfiguration.java | 25 ++++++----- .../src/main/resources/application.properties | 2 + .../PowerAuthWebServiceConfiguration.java | 42 +++++++++---------- .../PushServiceConfigProperties.java | 39 +++++++++++++++++ .../src/main/resources/application.properties | 4 ++ 6 files changed, 86 insertions(+), 32 deletions(-) create mode 100644 powerauth-webflow/src/main/java/io/getlime/security/powerauth/app/webflow/configuration/PushServiceConfigProperties.java diff --git a/docs/Web-Flow-Configuration.md b/docs/Web-Flow-Configuration.md index 378b92bdd..19f28a825 100644 --- a/docs/Web-Flow-Configuration.md +++ b/docs/Web-Flow-Configuration.md @@ -27,6 +27,8 @@ powerauth.nextstep.service.url=http://localhost:8080/powerauth-nextstep # PowerAuth Server URL powerauth.service.url=http://localhost:8080/powerauth-java-server/rest +powerauth.service.restClientConfig.responseTimeout=60s +powerauth.service.restClientConfig.maxIdleTime=200s powerauth.service.security.clientToken= powerauth.service.security.clientSecret= # Whether invalid SSL certificates should be accepted @@ -34,6 +36,8 @@ powerauth.service.ssl.acceptInvalidSslCertificate=false # PowerAuth Push Server URL powerauth.push.service.url=http://localhost:8080/powerauth-push-server +powerauth.push.service.restClientConfig.responseTimeout=60s +powerauth.push.service.restClientConfig.maxIdleTime=200s # Dynamic CSS stylesheet URL powerauth.webflow.page.title=PowerAuth Web Flow @@ -192,6 +196,8 @@ powerauth.dataAdapter.service.url=http://localhost:8080/powerauth-data-adapter # PowerAuth Server URL powerauth.service.url=http://localhost:8080/powerauth-java-server/rest +powerauth.service.restClientConfig.responseTimeout=60s +powerauth.service.restClientConfig.maxIdleTime=200s powerauth.service.security.clientToken= powerauth.service.security.clientSecret= # Whether invalid SSL certificates should be accepted diff --git a/powerauth-nextstep/src/main/java/io/getlime/security/powerauth/app/nextstep/configuration/NextStepServerConfiguration.java b/powerauth-nextstep/src/main/java/io/getlime/security/powerauth/app/nextstep/configuration/NextStepServerConfiguration.java index 7a982a758..223db6db9 100644 --- a/powerauth-nextstep/src/main/java/io/getlime/security/powerauth/app/nextstep/configuration/NextStepServerConfiguration.java +++ b/powerauth-nextstep/src/main/java/io/getlime/security/powerauth/app/nextstep/configuration/NextStepServerConfiguration.java @@ -29,8 +29,7 @@ import com.wultra.security.powerauth.rest.client.PowerAuthRestClientConfiguration; import io.getlime.security.powerauth.lib.dataadapter.client.DataAdapterClient; import io.getlime.security.powerauth.lib.dataadapter.client.DataAdapterClientErrorException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.ConfigurationProperties; @@ -38,6 +37,8 @@ import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; +import java.time.Duration; + /** * Configuration of Next Step server. * @@ -46,9 +47,9 @@ @Configuration @ConfigurationProperties("ext") @ComponentScan(basePackages = {"io.getlime.security.powerauth"}) +@Slf4j public class NextStepServerConfiguration { - private static final Logger logger = LoggerFactory.getLogger(NextStepServerConfiguration.class); private final AuditFactory auditFactory; /** @@ -60,6 +61,12 @@ public class NextStepServerConfiguration { @Value("${powerauth.service.url}") private String powerAuthRestUrl; + @Value("${powerauth.service.restClientConfig.responseTimeout}") + private Duration powerAuthServiceTimeout; + + @Value("${powerauth.service.restClientConfig.maxIdleTime}") + private Duration powerAuthServiceMaxIdleTime; + @Value("${powerauth.service.security.clientToken}") private String powerAuthClientToken; @@ -211,18 +218,14 @@ public DataAdapterClient defaultDataAdapterClient() { * @return PowerAuth REST client. */ @Bean - public PowerAuthClient powerAuthClient() { + public PowerAuthClient powerAuthClient() throws PowerAuthClientException { final PowerAuthRestClientConfiguration config = new PowerAuthRestClientConfiguration(); config.setPowerAuthClientToken(powerAuthClientToken); config.setPowerAuthClientSecret(powerAuthClientSecret); config.setAcceptInvalidSslCertificate(powerAuthAcceptInvalidSslCertificate); - try { - return new PowerAuthRestClient(powerAuthRestUrl, config); - } catch (PowerAuthClientException ex) { - logger.error(ex.getMessage(), ex); - audit().error(ex.getMessage(), ex); - return null; - } + config.setResponseTimeout(powerAuthServiceTimeout); + config.setMaxIdleTime(powerAuthServiceMaxIdleTime); + return new PowerAuthRestClient(powerAuthRestUrl, config); } /** diff --git a/powerauth-nextstep/src/main/resources/application.properties b/powerauth-nextstep/src/main/resources/application.properties index 8b9e8d76c..0f24fd4c6 100644 --- a/powerauth-nextstep/src/main/resources/application.properties +++ b/powerauth-nextstep/src/main/resources/application.properties @@ -20,6 +20,8 @@ powerauth.dataAdapter.service.url=http://localhost:8080/powerauth-data-adapter # PowerAuth Server URL powerauth.service.url=http://localhost:8080/powerauth-java-server/rest +powerauth.service.restClientConfig.responseTimeout=60s +powerauth.service.restClientConfig.maxIdleTime=200s powerauth.service.security.clientToken= powerauth.service.security.clientSecret= # Whether invalid SSL certificates should be accepted diff --git a/powerauth-webflow/src/main/java/io/getlime/security/powerauth/app/webflow/configuration/PowerAuthWebServiceConfiguration.java b/powerauth-webflow/src/main/java/io/getlime/security/powerauth/app/webflow/configuration/PowerAuthWebServiceConfiguration.java index 8338241f6..96c56a314 100644 --- a/powerauth-webflow/src/main/java/io/getlime/security/powerauth/app/webflow/configuration/PowerAuthWebServiceConfiguration.java +++ b/powerauth-webflow/src/main/java/io/getlime/security/powerauth/app/webflow/configuration/PowerAuthWebServiceConfiguration.java @@ -17,19 +17,21 @@ */ package io.getlime.security.powerauth.app.webflow.configuration; +import com.wultra.core.rest.client.base.RestClientConfiguration; import com.wultra.security.powerauth.client.PowerAuthClient; import com.wultra.security.powerauth.client.model.error.PowerAuthClientException; import com.wultra.security.powerauth.rest.client.PowerAuthRestClient; import com.wultra.security.powerauth.rest.client.PowerAuthRestClientConfiguration; import io.getlime.push.client.PushServerClient; import io.getlime.push.client.PushServerClientException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; +import java.time.Duration; + /** * Configuration for the PowerAuth Server connector. * @@ -37,15 +39,17 @@ */ @Configuration @ComponentScan(basePackages = {"io.getlime.security.powerauth"}) +@Slf4j public class PowerAuthWebServiceConfiguration { - private static final Logger logger = LoggerFactory.getLogger(PowerAuthWebServiceConfiguration.class); - @Value("${powerauth.service.url}") private String powerAuthRestUrl; - @Value("${powerauth.push.service.url}") - private String powerAuthPushServiceUrl; + @Value("${powerauth.service.restClientConfig.responseTimeout}") + private Duration powerAuthServiceTimeout; + + @Value("${powerauth.service.restClientConfig.maxIdleTime}") + private Duration powerAuthServiceMaxIdleTime; @Value("${powerauth.service.security.clientToken}") private String clientToken; @@ -61,17 +65,14 @@ public class PowerAuthWebServiceConfiguration { * @return PowerAuth REST client. */ @Bean - public PowerAuthClient powerAuthClient() { - PowerAuthRestClientConfiguration config = new PowerAuthRestClientConfiguration(); + public PowerAuthClient powerAuthClient() throws PowerAuthClientException { + final PowerAuthRestClientConfiguration config = new PowerAuthRestClientConfiguration(); config.setPowerAuthClientToken(clientToken); config.setPowerAuthClientSecret(clientSecret); config.setAcceptInvalidSslCertificate(acceptInvalidSslCertificate); - try { - return new PowerAuthRestClient(powerAuthRestUrl, config); - } catch (PowerAuthClientException ex) { - logger.error(ex.getMessage(), ex); - return null; - } + config.setResponseTimeout(powerAuthServiceTimeout); + config.setMaxIdleTime(powerAuthServiceMaxIdleTime); + return new PowerAuthRestClient(powerAuthRestUrl, config); } /** @@ -79,13 +80,12 @@ public PowerAuthClient powerAuthClient() { * @return Push server client. */ @Bean - public PushServerClient pushServerClient() { - try { - return new PushServerClient(powerAuthPushServiceUrl); - } catch (PushServerClientException ex) { - logger.error(ex.getMessage(), ex); - return null; - } + public PushServerClient pushServerClient(final PushServiceConfigProperties pushServiceProperties) throws PushServerClientException { + final String url = pushServiceProperties.getUrl(); + logger.info("Configuring PushServerClient for URL: {}", url); + final RestClientConfiguration restClientConfig = pushServiceProperties.getRestClientConfig(); + restClientConfig.setBaseUrl(url); + return new PushServerClient(restClientConfig); } } \ No newline at end of file diff --git a/powerauth-webflow/src/main/java/io/getlime/security/powerauth/app/webflow/configuration/PushServiceConfigProperties.java b/powerauth-webflow/src/main/java/io/getlime/security/powerauth/app/webflow/configuration/PushServiceConfigProperties.java new file mode 100644 index 000000000..20c44b436 --- /dev/null +++ b/powerauth-webflow/src/main/java/io/getlime/security/powerauth/app/webflow/configuration/PushServiceConfigProperties.java @@ -0,0 +1,39 @@ +/* + * PowerAuth Web Flow and related software components + * Copyright (C) 2024 Wultra s.r.o. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package io.getlime.security.powerauth.app.webflow.configuration; + +import com.wultra.core.rest.client.base.RestClientConfiguration; +import lombok.Getter; +import lombok.Setter; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +/** + * Configuration properties for Push Server. + * + * @author Lubos Racansky, lubos.racansky@wultra.com + */ +@Configuration +@ConfigurationProperties(prefix = "powerauth.push.service") +@Getter @Setter +public class PushServiceConfigProperties { + + private String url; + + private RestClientConfiguration restClientConfig; +} diff --git a/powerauth-webflow/src/main/resources/application.properties b/powerauth-webflow/src/main/resources/application.properties index 39d30c356..c20569a7d 100644 --- a/powerauth-webflow/src/main/resources/application.properties +++ b/powerauth-webflow/src/main/resources/application.properties @@ -9,6 +9,8 @@ powerauth.nextstep.service.url=http://localhost:8080/powerauth-nextstep # PowerAuth Server URL powerauth.service.url=http://localhost:8080/powerauth-java-server/rest +powerauth.service.restClientConfig.responseTimeout=60s +powerauth.service.restClientConfig.maxIdleTime=200s powerauth.service.security.clientToken= powerauth.service.security.clientSecret= # Whether invalid SSL certificates should be accepted @@ -16,6 +18,8 @@ powerauth.service.ssl.acceptInvalidSslCertificate=false # PowerAuth Push Server URL powerauth.push.service.url=http://localhost:8080/powerauth-push-server +powerauth.push.service.restClientConfig.responseTimeout=60s +powerauth.push.service.restClientConfig.maxIdleTime=200s # Dynamic CSS stylesheet URL powerauth.webflow.page.title=PowerAuth Web Flow From 4bce78a0dfd383ac5bf2b5436784ba297714365e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Jun 2024 05:30:56 +0000 Subject: [PATCH 15/19] Bump org.springframework.boot:spring-boot-starter-parent Bumps [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) from 3.3.0 to 3.3.1. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](https://github.com/spring-projects/spring-boot/compare/v3.3.0...v3.3.1) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter-parent dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 803d1e8dd..2310575ea 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 3.3.0 + 3.3.1 From 243a0720224ee583fb9957644e666736f3ad7db2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zden=C4=9Bk=20=C4=8Cern=C3=BD?= Date: Fri, 21 Jun 2024 13:48:43 +0200 Subject: [PATCH 16/19] Fix #1599: Modify base server in OpenAPI definition --- .../app/nextstep/configuration/OpenApiConfiguration.java | 2 ++ .../app/tppengine/configuration/OpenApiConfiguration.java | 2 ++ .../app/webflow/configuration/OpenApiConfiguration.java | 2 ++ 3 files changed, 6 insertions(+) diff --git a/powerauth-nextstep/src/main/java/io/getlime/security/powerauth/app/nextstep/configuration/OpenApiConfiguration.java b/powerauth-nextstep/src/main/java/io/getlime/security/powerauth/app/nextstep/configuration/OpenApiConfiguration.java index 5aaa053f9..2494a5b86 100644 --- a/powerauth-nextstep/src/main/java/io/getlime/security/powerauth/app/nextstep/configuration/OpenApiConfiguration.java +++ b/powerauth-nextstep/src/main/java/io/getlime/security/powerauth/app/nextstep/configuration/OpenApiConfiguration.java @@ -21,6 +21,7 @@ import io.swagger.v3.oas.annotations.info.Contact; import io.swagger.v3.oas.annotations.info.Info; import io.swagger.v3.oas.annotations.info.License; +import io.swagger.v3.oas.annotations.servers.Server; import org.springdoc.core.models.GroupedOpenApi; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -32,6 +33,7 @@ */ @Configuration @OpenAPIDefinition( + servers = @Server(url="/powerauth-nextstep"), info = @Info( title = "PowerAuth Next Step RESTful API Documentation", version = "1.0", diff --git a/powerauth-tpp-engine/src/main/java/io/getlime/security/powerauth/app/tppengine/configuration/OpenApiConfiguration.java b/powerauth-tpp-engine/src/main/java/io/getlime/security/powerauth/app/tppengine/configuration/OpenApiConfiguration.java index 1c61bcb32..6bcb7f00c 100644 --- a/powerauth-tpp-engine/src/main/java/io/getlime/security/powerauth/app/tppengine/configuration/OpenApiConfiguration.java +++ b/powerauth-tpp-engine/src/main/java/io/getlime/security/powerauth/app/tppengine/configuration/OpenApiConfiguration.java @@ -22,6 +22,7 @@ import io.swagger.v3.oas.annotations.info.Contact; import io.swagger.v3.oas.annotations.info.Info; import io.swagger.v3.oas.annotations.info.License; +import io.swagger.v3.oas.annotations.servers.Server; import org.springdoc.core.models.GroupedOpenApi; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -33,6 +34,7 @@ */ @Configuration @OpenAPIDefinition( + servers = @Server(url="/powerauth-tpp-engine"), info = @Info( title = "PowerAuth TPP Engine RESTful API Documentation", version = "1.0", diff --git a/powerauth-webflow/src/main/java/io/getlime/security/powerauth/app/webflow/configuration/OpenApiConfiguration.java b/powerauth-webflow/src/main/java/io/getlime/security/powerauth/app/webflow/configuration/OpenApiConfiguration.java index 68c990957..9b994c833 100644 --- a/powerauth-webflow/src/main/java/io/getlime/security/powerauth/app/webflow/configuration/OpenApiConfiguration.java +++ b/powerauth-webflow/src/main/java/io/getlime/security/powerauth/app/webflow/configuration/OpenApiConfiguration.java @@ -21,6 +21,7 @@ import io.swagger.v3.oas.annotations.info.Contact; import io.swagger.v3.oas.annotations.info.Info; import io.swagger.v3.oas.annotations.info.License; +import io.swagger.v3.oas.annotations.servers.Server; import org.springdoc.core.models.GroupedOpenApi; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -32,6 +33,7 @@ */ @Configuration @OpenAPIDefinition( + servers = @Server(url="/powerauth-webflow"), info = @Info( title = "PowerAuth Web Flow RESTful API Documentation", version = "1.0", From aa8631ca10b01649f867d99711c47c97da271a79 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 01:34:04 +0000 Subject: [PATCH 17/19] Bump org.springdoc:springdoc-openapi-starter-webmvc-ui Bumps [org.springdoc:springdoc-openapi-starter-webmvc-ui](https://github.com/springdoc/springdoc-openapi) from 2.5.0 to 2.6.0. - [Release notes](https://github.com/springdoc/springdoc-openapi/releases) - [Changelog](https://github.com/springdoc/springdoc-openapi/blob/main/CHANGELOG.md) - [Commits](https://github.com/springdoc/springdoc-openapi/compare/v2.5.0...v2.6.0) --- updated-dependencies: - dependency-name: org.springdoc:springdoc-openapi-starter-webmvc-ui dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2310575ea..85c8ad5b2 100644 --- a/pom.xml +++ b/pom.xml @@ -96,7 +96,7 @@ 1.6.4 - 2.5.0 + 2.6.0 2.2.22 1.4.4 From 8b97eaa77b76b8970045e50900af6ce9df15037a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 01:18:47 +0000 Subject: [PATCH 18/19] Bump org.springframework.boot:spring-boot-starter-parent Bumps [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) from 3.3.1 to 3.3.2. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](https://github.com/spring-projects/spring-boot/compare/v3.3.1...v3.3.2) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter-parent dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 85c8ad5b2..da9b1f2c3 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 3.3.1 + 3.3.2 From 58886a69710d499b8c85fa407bd37129551e614a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Ra=C4=8Dansk=C3=BD?= Date: Mon, 29 Jul 2024 13:38:09 +0200 Subject: [PATCH 19/19] Fix #1655: Set release version to 1.8.0 (#1657) * Fix #1655: Set release version to 1.8.0 * Update Wultra dependencies --- pom.xml | 10 +++++----- powerauth-data-adapter-client/pom.xml | 2 +- powerauth-data-adapter-model/pom.xml | 2 +- powerauth-mtoken-model/pom.xml | 2 +- powerauth-nextstep-client/pom.xml | 2 +- powerauth-nextstep-model/pom.xml | 2 +- powerauth-nextstep/pom.xml | 2 +- powerauth-tpp-engine-client/pom.xml | 2 +- powerauth-tpp-engine-model/pom.xml | 2 +- powerauth-tpp-engine/pom.xml | 2 +- powerauth-webflow-authentication-approval-sca/pom.xml | 2 +- powerauth-webflow-authentication-consent/pom.xml | 2 +- powerauth-webflow-authentication-form/pom.xml | 2 +- powerauth-webflow-authentication-init/pom.xml | 2 +- powerauth-webflow-authentication-login-sca/pom.xml | 2 +- powerauth-webflow-authentication-mtoken/pom.xml | 2 +- .../pom.xml | 2 +- powerauth-webflow-authentication-sms/pom.xml | 2 +- powerauth-webflow-authentication/pom.xml | 2 +- powerauth-webflow-client/pom.xml | 2 +- powerauth-webflow-i18n/pom.xml | 2 +- powerauth-webflow-resources/pom.xml | 2 +- powerauth-webflow/pom.xml | 2 +- 23 files changed, 27 insertions(+), 27 deletions(-) diff --git a/pom.xml b/pom.xml index da9b1f2c3..1604b20f1 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ io.getlime.security powerauth-webflow-parent - 1.8.0-SNAPSHOT + 1.8.0 pom @@ -104,10 +104,10 @@ 7.4 - 1.10.0-SNAPSHOT - 1.8.0-SNAPSHOT - 1.8.0-SNAPSHOT - 1.8.0-SNAPSHOT + 1.10.0 + 1.8.0 + 1.8.0 + 1.8.0 diff --git a/powerauth-data-adapter-client/pom.xml b/powerauth-data-adapter-client/pom.xml index d6ebcdaf1..2c117cbb8 100644 --- a/powerauth-data-adapter-client/pom.xml +++ b/powerauth-data-adapter-client/pom.xml @@ -28,7 +28,7 @@ powerauth-webflow-parent io.getlime.security - 1.8.0-SNAPSHOT + 1.8.0 diff --git a/powerauth-data-adapter-model/pom.xml b/powerauth-data-adapter-model/pom.xml index ebf3e21b4..7eba0a47c 100644 --- a/powerauth-data-adapter-model/pom.xml +++ b/powerauth-data-adapter-model/pom.xml @@ -28,7 +28,7 @@ powerauth-webflow-parent io.getlime.security - 1.8.0-SNAPSHOT + 1.8.0 diff --git a/powerauth-mtoken-model/pom.xml b/powerauth-mtoken-model/pom.xml index ad001d75e..07e8279fb 100644 --- a/powerauth-mtoken-model/pom.xml +++ b/powerauth-mtoken-model/pom.xml @@ -27,7 +27,7 @@ powerauth-webflow-parent io.getlime.security - 1.8.0-SNAPSHOT + 1.8.0 diff --git a/powerauth-nextstep-client/pom.xml b/powerauth-nextstep-client/pom.xml index 9d414bc2a..89d0978ae 100644 --- a/powerauth-nextstep-client/pom.xml +++ b/powerauth-nextstep-client/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.8.0-SNAPSHOT + 1.8.0 powerauth-nextstep-client diff --git a/powerauth-nextstep-model/pom.xml b/powerauth-nextstep-model/pom.xml index f07694a12..5519b7197 100644 --- a/powerauth-nextstep-model/pom.xml +++ b/powerauth-nextstep-model/pom.xml @@ -29,7 +29,7 @@ io.getlime.security powerauth-webflow-parent - 1.8.0-SNAPSHOT + 1.8.0 diff --git a/powerauth-nextstep/pom.xml b/powerauth-nextstep/pom.xml index f354b9172..c7ef55d63 100644 --- a/powerauth-nextstep/pom.xml +++ b/powerauth-nextstep/pom.xml @@ -28,7 +28,7 @@ io.getlime.security powerauth-webflow-parent - 1.8.0-SNAPSHOT + 1.8.0 diff --git a/powerauth-tpp-engine-client/pom.xml b/powerauth-tpp-engine-client/pom.xml index cbc605ba6..50e5472c3 100644 --- a/powerauth-tpp-engine-client/pom.xml +++ b/powerauth-tpp-engine-client/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.8.0-SNAPSHOT + 1.8.0 powerauth-tpp-engine-client diff --git a/powerauth-tpp-engine-model/pom.xml b/powerauth-tpp-engine-model/pom.xml index f1ef50cb5..9eadfebc3 100644 --- a/powerauth-tpp-engine-model/pom.xml +++ b/powerauth-tpp-engine-model/pom.xml @@ -24,7 +24,7 @@ powerauth-webflow-parent io.getlime.security - 1.8.0-SNAPSHOT + 1.8.0 powerauth-tpp-engine-model diff --git a/powerauth-tpp-engine/pom.xml b/powerauth-tpp-engine/pom.xml index f783dda13..259ef8fa3 100644 --- a/powerauth-tpp-engine/pom.xml +++ b/powerauth-tpp-engine/pom.xml @@ -28,7 +28,7 @@ io.getlime.security powerauth-webflow-parent - 1.8.0-SNAPSHOT + 1.8.0 diff --git a/powerauth-webflow-authentication-approval-sca/pom.xml b/powerauth-webflow-authentication-approval-sca/pom.xml index fb211dc91..448f641fd 100644 --- a/powerauth-webflow-authentication-approval-sca/pom.xml +++ b/powerauth-webflow-authentication-approval-sca/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.8.0-SNAPSHOT + 1.8.0 powerauth-webflow-authentication-approval-sca diff --git a/powerauth-webflow-authentication-consent/pom.xml b/powerauth-webflow-authentication-consent/pom.xml index 5949f36e4..3390ece85 100644 --- a/powerauth-webflow-authentication-consent/pom.xml +++ b/powerauth-webflow-authentication-consent/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.8.0-SNAPSHOT + 1.8.0 powerauth-webflow-authentication-consent diff --git a/powerauth-webflow-authentication-form/pom.xml b/powerauth-webflow-authentication-form/pom.xml index b06301dda..e93b3dc18 100644 --- a/powerauth-webflow-authentication-form/pom.xml +++ b/powerauth-webflow-authentication-form/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.8.0-SNAPSHOT + 1.8.0 powerauth-webflow-authentication-form diff --git a/powerauth-webflow-authentication-init/pom.xml b/powerauth-webflow-authentication-init/pom.xml index 0ca29bfe6..a85824923 100644 --- a/powerauth-webflow-authentication-init/pom.xml +++ b/powerauth-webflow-authentication-init/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.8.0-SNAPSHOT + 1.8.0 powerauth-webflow-authentication-init diff --git a/powerauth-webflow-authentication-login-sca/pom.xml b/powerauth-webflow-authentication-login-sca/pom.xml index 8b7772d8b..fa0f331b4 100644 --- a/powerauth-webflow-authentication-login-sca/pom.xml +++ b/powerauth-webflow-authentication-login-sca/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.8.0-SNAPSHOT + 1.8.0 powerauth-webflow-authentication-login-sca diff --git a/powerauth-webflow-authentication-mtoken/pom.xml b/powerauth-webflow-authentication-mtoken/pom.xml index c23c35c6f..0b0f8be1b 100644 --- a/powerauth-webflow-authentication-mtoken/pom.xml +++ b/powerauth-webflow-authentication-mtoken/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.8.0-SNAPSHOT + 1.8.0 powerauth-webflow-authentication-mtoken diff --git a/powerauth-webflow-authentication-operation-review/pom.xml b/powerauth-webflow-authentication-operation-review/pom.xml index 2f46b49c4..fb8d2cdf2 100644 --- a/powerauth-webflow-authentication-operation-review/pom.xml +++ b/powerauth-webflow-authentication-operation-review/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.8.0-SNAPSHOT + 1.8.0 powerauth-webflow-authentication-operation-review diff --git a/powerauth-webflow-authentication-sms/pom.xml b/powerauth-webflow-authentication-sms/pom.xml index 5233fd20b..d51dda749 100644 --- a/powerauth-webflow-authentication-sms/pom.xml +++ b/powerauth-webflow-authentication-sms/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.8.0-SNAPSHOT + 1.8.0 powerauth-webflow-authentication-sms diff --git a/powerauth-webflow-authentication/pom.xml b/powerauth-webflow-authentication/pom.xml index 98ca0e894..063b582f1 100644 --- a/powerauth-webflow-authentication/pom.xml +++ b/powerauth-webflow-authentication/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.8.0-SNAPSHOT + 1.8.0 io.getlime.security diff --git a/powerauth-webflow-client/pom.xml b/powerauth-webflow-client/pom.xml index 69cd4d819..eb1da0096 100644 --- a/powerauth-webflow-client/pom.xml +++ b/powerauth-webflow-client/pom.xml @@ -30,7 +30,7 @@ powerauth-webflow-parent io.getlime.security - 1.8.0-SNAPSHOT + 1.8.0 diff --git a/powerauth-webflow-i18n/pom.xml b/powerauth-webflow-i18n/pom.xml index 6ed46bbd9..288f266bb 100644 --- a/powerauth-webflow-i18n/pom.xml +++ b/powerauth-webflow-i18n/pom.xml @@ -28,7 +28,7 @@ io.getlime.security powerauth-webflow-parent - 1.8.0-SNAPSHOT + 1.8.0 diff --git a/powerauth-webflow-resources/pom.xml b/powerauth-webflow-resources/pom.xml index 3a43b206a..b17262fd0 100644 --- a/powerauth-webflow-resources/pom.xml +++ b/powerauth-webflow-resources/pom.xml @@ -25,7 +25,7 @@ powerauth-webflow-parent io.getlime.security - 1.8.0-SNAPSHOT + 1.8.0 io.getlime.security diff --git a/powerauth-webflow/pom.xml b/powerauth-webflow/pom.xml index 6fc38393d..6cc8dee00 100644 --- a/powerauth-webflow/pom.xml +++ b/powerauth-webflow/pom.xml @@ -24,7 +24,7 @@ io.getlime.security powerauth-webflow-parent - 1.8.0-SNAPSHOT + 1.8.0 powerauth-webflow