From 071f91002f622382dacd81cfd91c4b551349343d Mon Sep 17 00:00:00 2001 From: Ashan Thamara Palihakkara <75057725+ashanthamara@users.noreply.github.com> Date: Thu, 28 Mar 2024 20:11:52 +0530 Subject: [PATCH] Fixed minor alignment issues in method description --- .../OAuth2IDTokenEncryptionTestCase.java | 4 +- .../OAuth2ServiceAbstractIntegrationTest.java | 109 +++++++++--------- ...OAuth2ServiceSAML2BearerGrantTestCase.java | 6 +- .../oidc/OIDCAbstractIntegrationTest.java | 9 +- .../integration/test/oidc/OIDCUtilTest.java | 4 +- .../ChallengeQuestionsRestClient.java | 4 +- .../ClaimManagementRestClient.java | 6 +- .../restclients/EmailTemplatesRestClient.java | 2 +- .../IdentityGovernanceRestClient.java | 4 +- .../test/restclients/IdpMgtRestClient.java | 4 +- .../test/restclients/OAuth2RestClient.java | 10 +- .../test/restclients/RestBaseClient.java | 12 +- .../test/restclients/SCIM2RestClient.java | 14 +-- .../restclients/UserStoreMgtRestClient.java | 12 +- 14 files changed, 103 insertions(+), 97 deletions(-) diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2IDTokenEncryptionTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2IDTokenEncryptionTestCase.java index 115530223b4..2a9d4bf9592 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2IDTokenEncryptionTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2IDTokenEncryptionTestCase.java @@ -465,7 +465,7 @@ private void initServiceProviderKeys() throws Exception { * @param client CloseableHttpClient object to send the login post. * @param sessionDataKey String sessionDataKey obtained. * @return Extracted sessionDataKeyConsent. - * @throws IOException If an error occurred while getting Session Data key Consent. + * @throws IOException If an error occurred while getting Session Data key Consent. * @throws URISyntaxException If an error occurred while extracting Session Data key parameter. */ private String getSessionDataKeyConsent(CloseableHttpClient client, String sessionDataKey) @@ -499,7 +499,7 @@ private String getSessionDataKeyConsent(CloseableHttpClient client, String sessi * @param audience Audience value that should be appeared in the token. * @return Boolean True if audience matches, False otherwise. * @throws ParseException If an error occurred while getting jwt. - * @throws JOSEException If an error occurred while decrypting jwt. + * @throws JOSEException If an error occurred while decrypting jwt. */ private boolean decryptAndCheckIDToken(String idToken, String audience) throws ParseException, JOSEException { diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAbstractIntegrationTest.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAbstractIntegrationTest.java index 6cd72d9ec2b..4149c4f2d32 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAbstractIntegrationTest.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAbstractIntegrationTest.java @@ -247,7 +247,7 @@ public ApplicationResponseModel getApplication(String appId) throws Exception { /** * Get Application details with a given id. * - * @param appId Application Id. + * @param appId Application Id. * @param application Application update patch object. * @throws Exception If an error occurred while updating an application. */ @@ -283,9 +283,9 @@ public SAML2ServiceProvider getSAMLInboundDetailsOfApplication(String appId) thr /** * Update Application inbound configuration details with a given id and the inbound Type. * - * @param appId Application Id. + * @param appId Application Id. * @param InboundConfig InboundConfig object. - * @param inboundType inbound configuration type. + * @param inboundType inbound configuration type. * @throws IOException If an error occurred while updating Inbound configurations of an application. */ public void updateApplicationInboundConfig(String appId, Object InboundConfig, String inboundType) @@ -402,12 +402,13 @@ private RequestedClaimConfiguration getRequestedClaim(String claimUri) { /** * Send post request with parameters. - * @param client HttpClient. + * + * @param client HttpClient. * @param urlParameters Url parameters. - * @param url Endpoint. + * @param url Endpoint. * @return HttpResponse. * @throws ClientProtocolException If an error occurred while executing http POST request. - * @throws java.io.IOException If an error occurred while executing http POST request. + * @throws java.io.IOException If an error occurred while executing http POST request. */ public HttpResponse sendPostRequestWithParameters(HttpClient client, List urlParameters, String url) throws ClientProtocolException, IOException { @@ -422,11 +423,11 @@ public HttpResponse sendPostRequestWithParameters(HttpClient client, List auth /** * Build post request and return json response object. * - * @param endpoint Endpoint. - * @param postParameters postParameters. - * @param client httpclient. - * @param authorizationHeader Authentication header. + * @param endpoint Endpoint. + * @param postParameters postParameters. + * @param client httpclient. + * @param authorizationHeader Authentication header. * @return JSON object of the response. * @throws Exception If an error occurred while executing http POST request and generating response object. */ @@ -934,7 +937,7 @@ private JSONObject responseObject(HttpClient client, String endpoint, List getNameValuePairs(OIDCApplication application, /** * Set sessionDataKey. - * @param response response + * + * @param response response * @param keyPositionMap map to preserve the sessionDataKey. * @throws IOException if an error occurs when extracting data from the response. */ diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/ChallengeQuestionsRestClient.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/ChallengeQuestionsRestClient.java index 0c51b506378..3f293197e09 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/ChallengeQuestionsRestClient.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/ChallengeQuestionsRestClient.java @@ -50,8 +50,8 @@ public ChallengeQuestionsRestClient(String serverUrl, Tenant tenantInfo) { /** * Set Answers for the user challenge questions * - * @param userId userId. - * @param questionSetId Challenge Question Set id. + * @param userId userId. + * @param questionSetId Challenge Question Set id. * @param challengeAsnwerObj Challenge Question request object. * @throws IOException If an error occurred while setting the challenge question answer. */ diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/ClaimManagementRestClient.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/ClaimManagementRestClient.java index 372d049b6b1..b48eb0dbe98 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/ClaimManagementRestClient.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/ClaimManagementRestClient.java @@ -61,7 +61,7 @@ public ClaimManagementRestClient(String backendURL, Tenant tenantInfo) { /** * Add External Claim. * - * @param dialectId Claim dialect id. + * @param dialectId Claim dialect id. * @param claimRequest External Claim request object. * @throws Exception If an error occurred while adding an external claim. */ @@ -80,7 +80,7 @@ public String addExternalClaim(String dialectId, ExternalClaimReq claimRequest) * Get an External Claim. * * @param dialectId Claim dialect id. - * @param claimId claim id. + * @param claimId Claim id. * @return JSONObject JSON object of the response. * @throws Exception If an error occurred while getting an external claim. */ @@ -98,7 +98,7 @@ public JSONObject getExternalClaim(String dialectId, String claimId) throws Exce * Delete an External Claim. * * @param dialectId Claim dialect id. - * @param claimId claim id. + * @param claimId Claim id. * @throws IOException If an error occurred while deleting an external claim. */ public void deleteExternalClaim(String dialectId, String claimId) throws IOException { diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/EmailTemplatesRestClient.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/EmailTemplatesRestClient.java index 320515c9bd0..7c261f1cb9a 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/EmailTemplatesRestClient.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/EmailTemplatesRestClient.java @@ -61,7 +61,7 @@ public EmailTemplatesRestClient(String backendURL, Tenant tenantInfo) { * Get Email template. * * @param templateTypeId Template type id. - * @param templateId Template id. + * @param templateId Template id. * @return JSONObject with email template details. * @throws Exception If an error occurred while getting Email Template. */ diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/IdentityGovernanceRestClient.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/IdentityGovernanceRestClient.java index 0479859b9a8..58f0b9d732d 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/IdentityGovernanceRestClient.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/IdentityGovernanceRestClient.java @@ -62,8 +62,8 @@ public IdentityGovernanceRestClient(String backendURL, Tenant tenantInfo) { /** * Update connector properties. * - * @param categoryId Connector category id. - * @param connectorId Connector id. + * @param categoryId Connector category id. + * @param connectorId Connector id. * @param connectorPatch Connector patch request object. * @throws IOException If an error occurred while updating the governance connectors. */ diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/IdpMgtRestClient.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/IdpMgtRestClient.java index 33ba21ffe5c..3ede99d378c 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/IdpMgtRestClient.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/IdpMgtRestClient.java @@ -74,7 +74,7 @@ public String createIdentityProvider(IdentityProviderPOSTRequest idpCreateReqObj /** * Get an Identity Provider's federated authenticator * - * @param idpId identity provider id. + * @param idpId identity provider id. * @param federatedAuthenticatorId Federated Authenticator id. * @return JSONObject with Federated Authenticator details. * @throws Exception If an error occurred while getting idp's federated authenticator. @@ -93,7 +93,7 @@ public JSONObject getIdpFederatedAuthenticator(String idpId, String federatedAut /** * Update an Identity Provider claim configurations. * - * @param idpId Identity Provider Id. + * @param idpId Identity Provider Id. * @param idpClaims Identity Provider claim request object. * @throws IOException If an error occurred while updating idp claim configurations. */ diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/OAuth2RestClient.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/OAuth2RestClient.java index 1477055996d..4e7c0d50a3e 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/OAuth2RestClient.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/OAuth2RestClient.java @@ -84,7 +84,7 @@ public OAuth2RestClient(String backendUrl, Tenant tenantInfo) { * * @param application Application Model with application creation details. * @return Id of the created application. - * @throws IOException If an error occurred while creating an application. + * @throws IOException If an error occurred while creating an application. * @throws JSONException If an error occurred while creating the json string. */ public String createApplication(ApplicationModel application) throws IOException, JSONException { @@ -156,7 +156,7 @@ public List getApplicationsByClientId(String clientId) thro /** * Update an existing application. * - * @param appId Application id. + * @param appId Application id. * @param application Updated application patch object. * @throws IOException If an error occurred while updating an application. */ @@ -245,9 +245,9 @@ private String getConfig(String appId, String inboundType) throws Exception { /** * Update inbound configuration details of an application. * - * @param appId Application id. + * @param appId Application id. * @param inboundConfig Inbound configuration object to be updated. - * @param inboundType Type of the inbound configuration. + * @param inboundType Type of the inbound configuration. * @throws IOException If an error occurred while updating an inbound configuration. */ public void updateInboundDetailsOfApplication(String appId, Object inboundConfig, String inboundType) @@ -266,7 +266,7 @@ public void updateInboundDetailsOfApplication(String appId, Object inboundConfig /** * Delete an Inbound Configuration. * - * @param appId Application id. + * @param appId Application id. * @param inboundType Inbound Type to be deleted. * @throws IOException If an error occurred while deleting an inbound configuration. */ diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/RestBaseClient.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/RestBaseClient.java index e1adcdde07f..55a4f34e813 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/RestBaseClient.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/RestBaseClient.java @@ -124,7 +124,7 @@ public CloseableHttpResponse getResponseOfHttpPost(String endPointUrl, String js * Execute and get the response of HTTP GET. * * @param endPointUrl REST endpoint. - * @param headers header list of the request. + * @param headers Header list of the request. * @return Response of the Http request. * @throws IOException If an error occurred while executing http GET request. */ @@ -141,8 +141,8 @@ public CloseableHttpResponse getResponseOfHttpGet(String endPointUrl, Header[] h * Execute and get the response of HTTP PATCH. * * @param endPointUrl REST endpoint. - * @param jsonRequest json body. - * @param headers header list of the request. + * @param jsonRequest Json body. + * @param headers Header list of the request. * @return Response of the Http request. * @throws IOException If an error occurred while executing http PATCH request. */ @@ -159,7 +159,7 @@ public CloseableHttpResponse getResponseOfHttpPatch(String endPointUrl, String j * Execute and get the response of HTTP DELETE. * * @param endPointUrl REST endpoint. - * @param headers header list of the request. + * @param headers Header list of the request. * @return Response of the Http request. * @throws IOException If an error occurred while executing http DELETE request. */ @@ -175,8 +175,8 @@ public CloseableHttpResponse getResponseOfHttpDelete(String endPointUrl, Header[ * Execute and get the response of HTTP PUT. * * @param endPointUrl REST endpoint. - * @param jsonRequest json body. - * @param headers header list of the request. + * @param jsonRequest Json body. + * @param headers Header list of the request. * @return Response of the Http request. * @throws IOException If an error occurred while executing http PUT request. */ diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/SCIM2RestClient.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/SCIM2RestClient.java index e748d4f9f60..a81654c4259 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/SCIM2RestClient.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/SCIM2RestClient.java @@ -88,8 +88,8 @@ public String createUser(UserObject userInfo) throws Exception { /** * Get the details of a user. * - * @param userId id of the user. - * @param attribute requested user attributes + * @param userId Id of the user. + * @param attribute Requested user attributes. * @return JSONObject of the HTTP response. * @throws Exception If an error occurred while getting a user. */ @@ -110,8 +110,8 @@ public JSONObject getUser(String userId, String attribute) throws Exception { /** * Update the details of an existing user. * - * @param patchUserInfo user patch request object. - * @param userId id of the user. + * @param patchUserInfo User patch request object. + * @param userId Id of the user. * @throws IOException If an error occurred while updating a user. */ public void updateUser(PatchOperationRequestObject patchUserInfo, String userId) throws IOException { @@ -128,7 +128,7 @@ public void updateUser(PatchOperationRequestObject patchUserInfo, String userId) /** * Search a user and get requested attributes. * - * @param userSearchReq json String of user search request. + * @param userSearchReq Json String of user search request. * @return JSONObject of the user search response. * @throws Exception If an error occurred while getting a user. */ @@ -146,7 +146,7 @@ public JSONObject searchUser(String userSearchReq) throws Exception { /** * Delete an existing user. * - * @param userId id of the user. + * @param userId Id of the user. * @throws IOException If an error occurred while deleting a user. */ public void deleteUser(String userId) throws IOException { @@ -182,7 +182,7 @@ public String addRole(RoleRequestObject roleInfo) throws Exception { * Update an existing role. * * @param patchRoleInfo Role patch request object. - * @param roleId Role id. + * @param roleId Role id. * @throws IOException If an error occurred while updating a role. */ public void updateUserRole(PatchOperationRequestObject patchRoleInfo, String roleId) throws IOException { diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/UserStoreMgtRestClient.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/UserStoreMgtRestClient.java index bb3ce91e179..a2e5e105a80 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/UserStoreMgtRestClient.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/UserStoreMgtRestClient.java @@ -61,12 +61,12 @@ public UserStoreMgtRestClient(String backendURL, Tenant tenantInfo) { /** * Add a secondary user store. * - * @param UserStoreReq Secondary user store request object. + * @param userStoreReq Secondary user store request object. * @throws IOException If an error occurred while adding a user store. */ - public String addUserStore(UserStoreReq UserStoreReq) throws IOException { + public String addUserStore(UserStoreReq userStoreReq) throws IOException { - String jsonRequest = toJSONString(UserStoreReq); + String jsonRequest = toJSONString(userStoreReq); try (CloseableHttpResponse response = getResponseOfHttpPost(userStoreBasePath, jsonRequest, getHeaders())) { String[] locationElements = response.getHeaders(LOCATION_HEADER)[0].toString().split(PATH_SEPARATOR); return locationElements[locationElements.length - 1]; @@ -87,7 +87,7 @@ public JSONArray getUserStores() throws Exception { } /** - * Delete a user store + * Delete a user store. * * @param domain User store domain(id). * @throws IOException If an error occurred while deleting a user store. @@ -103,9 +103,9 @@ public void deleteUserStore(String domain) throws IOException { } /** - * Check user store deployment + * Check user store deployment. * - * @param domain User Store name + * @param domain User Store name. * @return boolean response of the user store deployment. * @throws Exception If an error occurred while checking the user store creation. */