Skip to content

Commit

Permalink
Fixed minor alignment issues in method description
Browse files Browse the repository at this point in the history
  • Loading branch information
ashanthamara committed Mar 28, 2024
1 parent b7c33fd commit 071f910
Show file tree
Hide file tree
Showing 14 changed files with 103 additions and 97 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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<NameValuePair> urlParameters, String url)
throws ClientProtocolException, IOException {
Expand All @@ -422,11 +423,11 @@ public HttpResponse sendPostRequestWithParameters(HttpClient client, List<NameVa
/**
* Send Get request.
*
* @param client - Http Client.
* @param client - Http Client.
* @param locationURL - Get url location.
* @return Http response.
* @throws ClientProtocolException If an error occurred while executing http GET request.
* @throws java.io.IOException If an error occurred while executing http GET request.
* @throws java.io.IOException If an error occurred while executing http GET request.
*/
public HttpResponse sendGetRequest(HttpClient client, String locationURL) throws ClientProtocolException, IOException {

Expand Down Expand Up @@ -463,11 +464,11 @@ public HttpResponse sendConsentGetRequest(CloseableHttpClient client, String loc
/**
* Send Post request.
*
* @param client - Http Client.
* @param client - Http Client.
* @param locationURL - Post url location.
* @return Http response.
* @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 sendPostRequest(HttpClient client, String locationURL) throws ClientProtocolException,
IOException {
Expand All @@ -480,11 +481,11 @@ public HttpResponse sendPostRequest(HttpClient client, String locationURL) throw
/**
* Send login post request.
*
* @param client - Http client.
* @param client - Http client.
* @param sessionDataKey - Session data key.
* @return Http response.
* @throws ClientProtocolException If an error occurred while executing login post request.
* @throws java.io.IOException If an error occurred while executing login post request.
* @throws java.io.IOException If an error occurred while executing login post request.
*/
public HttpResponse sendLoginPost(HttpClient client, String sessionDataKey) throws ClientProtocolException,
IOException {
Expand All @@ -506,8 +507,8 @@ public HttpResponse sendLoginPost(HttpClient client, String sessionDataKey) thro
* @param username Username.
* @param password Password.
* @return Http response.
* @throws ClientProtocolException If an error occurred while executing login post request.
* @throws IOException If an error occurred while executing login post request.
* @throws ClientProtocolException If an error occurred while executing login post request.
* @throws IOException If an error occurred while executing login post request.
*/
public HttpResponse sendLoginPostForCustomUsers(HttpClient client, String sessionDataKey, String username,
String password) throws ClientProtocolException, IOException {
Expand All @@ -528,10 +529,10 @@ public HttpResponse sendLoginPostForCustomUsers(HttpClient client, String sessio
* @param sessionDataKey Session data key.
* @param username Username.
* @param password Password.
* @param tenantDomain Tenant domain.
* @param tenantDomain Tenant domain.
* @return Http response.
* @throws ClientProtocolException If an error occurred while executing login post request.
* @throws IOException If an error occurred while executing login post request.
* @throws ClientProtocolException If an error occurred while executing login post request.
* @throws IOException If an error occurred while executing login post request.
*/
public HttpResponse sendLoginPostForCustomUsers(HttpClient client, String sessionDataKey, String username,
String password, String tenantDomain)
Expand All @@ -549,11 +550,11 @@ public HttpResponse sendLoginPostForCustomUsers(HttpClient client, String sessio
/**
* Send approval post request.
*
* @param client - Http client.
* @param client - Http client.
* @param sessionDataKeyConsent - Session consent data.
* @return Http response.
* @throws ClientProtocolException If an error occurred while executing approval post request.
* @throws java.io.IOException If an error occurred while executing approval post request.
* @throws java.io.IOException If an error occurred while executing approval post request.
*/
public HttpResponse sendApprovalPost(HttpClient client, String sessionDataKeyConsent) throws ClientProtocolException,
IOException {
Expand All @@ -569,9 +570,9 @@ public HttpResponse sendApprovalPost(HttpClient client, String sessionDataKeyCon
/**
* Send approval post request with consent.
*
* @param client Http client.
* @param client Http client.
* @param sessionDataKeyConsent Session consent data.
* @param consentClaims Claims requiring user consent.
* @param consentClaims Claims requiring user consent.
* @return Http response.
* @throws java.io.IOException If an error occurred while executing approval post request with consent.
*/
Expand All @@ -594,10 +595,10 @@ public HttpResponse sendApprovalPostWithConsent(HttpClient client, String sessio
/**
* Send approval post request for tenant with consent.
*
* @param client Http client.
* @param client Http client.
* @param sessionDataKeyConsent Session consent data.
* @param consentClaims Claims requiring user consent.
* @param tenantDomain Tenant domain.
* @param consentClaims Claims requiring user consent.
* @param tenantDomain Tenant domain.
* @return Http response.
* @throws java.io.IOException If an error occurred while executing approval post request for a tenant.
*/
Expand All @@ -621,11 +622,11 @@ public HttpResponse sendApprovalPostWithConsent(HttpClient client, String sessio
/**
* Send access token post request.
*
* @param client - Http client.
* @param client - Http client.
* @param consumerSecret - Consumer secret.
* @return Http response.
* @throws ClientProtocolException If an error occurred while executing access token post request.
* @throws java.io.IOException If an error occurred while executing access token post request.
* @throws java.io.IOException If an error occurred while executing access token post request.
*/
public HttpResponse sendGetAccessTokenPost(HttpClient client, String consumerSecret) throws ClientProtocolException,
IOException {
Expand All @@ -639,11 +640,12 @@ public HttpResponse sendGetAccessTokenPost(HttpClient client, String consumerSec

/**
* Send validate access token post request.
* @param client - Http client.
*
* @param client - Http client.
* @param accessToken - Access token.
* @return Http response.
* @throws ClientProtocolException If an error occurred while executing validate access token post request.
* @throws java.io.IOException If an error occurred while executing validate access token post request.
* @throws java.io.IOException If an error occurred while executing validate access token post request.
*/
public HttpResponse sendValidateAccessTokenPost(HttpClient client, String accessToken)
throws ClientProtocolException,
Expand All @@ -656,9 +658,10 @@ public HttpResponse sendValidateAccessTokenPost(HttpClient client, String access

/**
* Send token introspection post request according to the tenant domain.
* @param client - Http client.
*
* @param client - Http client.
* @param accessToken - Access token.
* @param endpoint - Introspection URL of the tenant domain.
* @param endpoint - Introspection URL of the tenant domain.
* @return JSON object of the response.
* @throws Exception If an error occurred while executing token introspection post request.
*/
Expand Down Expand Up @@ -700,15 +703,15 @@ public void removeOAuthApplicationData() throws Exception {
adminClient.removeOAuthApplicationData(consumerKey);
}

/**
* Request access token from the given token generation endpoint.
*
* @param consumerKey Consumer key of the application.
* @param consumerSecret Consumer secret of the application.
* @param backendUrl Token generation API endpoint.
* @return Token.
* @throws Exception If something went wrong when requesting token.
*/
/**
* Request access token from the given token generation endpoint.
*
* @param consumerKey Consumer key of the application.
* @param consumerSecret Consumer secret of the application.
* @param backendUrl Token generation API endpoint.
* @return Token.
* @throws Exception If something went wrong when requesting token.
*/
public String requestAccessToken(String consumerKey, String consumerSecret,
String backendUrl, String username, String password) throws Exception {

Expand Down Expand Up @@ -737,13 +740,13 @@ public String requestAccessToken(String consumerKey, String consumerSecret,
return accessToken.toString();
}

/**
* Get base64 encoded string of consumer key and secret.
*
* @param consumerKey Consumer key of the application.
* @param consumerSecret Consumer secret of the application.
* @return Base 64 encoded string.
*/
/**
* Get base64 encoded string of consumer key and secret.
*
* @param consumerKey Consumer key of the application.
* @param consumerSecret Consumer secret of the application.
* @return Base 64 encoded string.
*/
public String getBase64EncodedString(String consumerKey, String consumerSecret) {

return new String(Base64.encodeBase64((consumerKey + ":" + consumerSecret).getBytes()));
Expand All @@ -752,7 +755,7 @@ public String getBase64EncodedString(String consumerKey, String consumerSecret)
/**
* Update the certificate of an application.
*
* @param appId Application Id.
* @param appId Application Id.
* @param sp1X509PublicCert X509 certificate of the application.
* @throws Exception If an error occurred while updating the certificate of the application.
*/
Expand Down Expand Up @@ -906,10 +909,10 @@ private void setInboundOAuthConfig(List<InboundAuthenticationRequestConfig> 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.
*/
Expand All @@ -934,7 +937,7 @@ private JSONObject responseObject(HttpClient client, String endpoint, List<NameV
/**
* Get public certificate from jwks endpoint.
*
* @param client HttpClient.
* @param client HttpClient.
* @param endPoint jwks endpoint.
* @return String object of the certificate.
* @throws Exception If an error occurred while getting the public certificate from jwks endpoint.
Expand All @@ -952,7 +955,7 @@ public String getPublicCertificate(CloseableHttpClient client, String endPoint)
/**
* Authorize list of SYSTEM APIs to an application.
*
* @param applicationId Application id.
* @param applicationId Application id.
* @param apiIdentifiers API identifiers to authorize.
* @throws Exception Error occured while authorizing APIs.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,9 @@ private String getSAMLResponse() throws Exception {
*
* @param samlResponse SAML response.
* @return Extracted SAML assertion.
* @throws ParserConfigurationException Exception.
* @throws IOException If an error occurred while getting the SAML assersion.
* @throws SAXException If an error occurred while getting the SAML assersion.
* @throws ParserConfigurationException If an error occurred while creating document builder.
* @throws IOException If an error occurred while getting the SAML assersion.
* @throws SAXException If an error occurred while parsing.
*/
private String getSAMLAssersion(String samlResponse) throws ParserConfigurationException, IOException,
SAXException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected void init(TestUserMode userMode) throws Exception {
}

/**
* Clear the intialized clients.
* Clear the initialized clients.
*/
public void clear() {

Expand Down Expand Up @@ -177,10 +177,11 @@ public void deleteApplication(OIDCApplication application) throws Exception {

/**
* Sends Authentication Request for an OIDC Flow.
* @param application application.
*
* @param application application.
* @param isFirstAuthenticationRequest true if the request is the first authentication request.
* @param client http client.
* @param cookieStore cookie store.
* @param client http client.
* @param cookieStore cookie store.
* @throws Exception throws if an error occurs when sending the authentication request.
*/
public void testSendAuthenticationRequest(OIDCApplication application, boolean isFirstAuthenticationRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public static void initApplications() {

/**
* To set and get name-value pairs.
*
* @param application application.
* @return name-value pairs.
*/
Expand All @@ -127,7 +128,8 @@ public static List<NameValuePair> 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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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.
*/
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
Loading

0 comments on commit 071f910

Please sign in to comment.