From 14993765e2d637a53325651e8fc445eba4e79e3a Mon Sep 17 00:00:00 2001 From: asha15 <165079T@uom.lk> Date: Fri, 28 Jun 2024 11:00:23 +0530 Subject: [PATCH 1/2] add hybrid flow response type --- .../v1/model/HybridFlowConfiguration.java | 103 ++++++++++++++++++ .../v1/model/OpenIDConnectConfiguration.java | 23 +++- 2 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/HybridFlowConfiguration.java diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/HybridFlowConfiguration.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/HybridFlowConfiguration.java new file mode 100644 index 00000000000..c4e731d95cb --- /dev/null +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/HybridFlowConfiguration.java @@ -0,0 +1,103 @@ +package org.wso2.identity.integration.test.rest.api.server.application.management.v1.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.*; + + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; + +public class HybridFlowConfiguration { + + private Boolean enable; + private String responseType; + + /** + * + **/ + public HybridFlowConfiguration enable(Boolean enable) { + + this.enable = enable; + return this; + } + + @ApiModelProperty(example = "true", value = "") + @JsonProperty("enable") + @Valid + public Boolean getEnable() { + return enable; + } + + public void setEnable(Boolean enable) { + this.enable = enable; + } + + /** + * + **/ + public HybridFlowConfiguration responseType(String responseType) { + + this.responseType = responseType; + return this; + } + + @ApiModelProperty(example = "code id_token", value = "") + @JsonProperty("responseType") + @Valid + public String getResponseType() { + return responseType; + } + + public void setResponseType(String responseType) { + this.responseType = responseType; + } + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HybridFlowConfiguration hybridFlowConfiguration = (HybridFlowConfiguration) o; + return Objects.equals(this.enable, hybridFlowConfiguration.enable) && + Objects.equals(this.responseType, hybridFlowConfiguration.responseType); + } + + @Override + public int hashCode() { + return Objects.hash(enable, responseType); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class HybridFlowConfiguration {\n"); + + sb.append(" enable: ").append(toIndentedString(enable)).append("\n"); + sb.append(" responseType: ").append(toIndentedString(responseType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/OpenIDConnectConfiguration.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/OpenIDConnectConfiguration.java index de4c353f5f9..1975ab6600e 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/OpenIDConnectConfiguration.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/OpenIDConnectConfiguration.java @@ -74,6 +74,7 @@ public static StateEnum fromValue(String value) { private Boolean publicClient = false; private OAuth2PKCEConfiguration pkce; + private HybridFlowConfiguration hybridFlow; private AccessTokenConfiguration accessToken; private RefreshTokenConfiguration refreshToken; private SubjectTokenConfiguration subjectToken; @@ -258,6 +259,24 @@ public void setPkce(OAuth2PKCEConfiguration pkce) { this.pkce = pkce; } + /** + **/ + public OpenIDConnectConfiguration hybridFlow(HybridFlowConfiguration hybridFlow) { + + this.hybridFlow = hybridFlow; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("hybridFlow") + @Valid + public HybridFlowConfiguration getHybridFlow() { + return hybridFlow; + } + public void setHybridFlow(HybridFlowConfiguration hybridFlow) { + this.hybridFlow = hybridFlow; + } + /** **/ public OpenIDConnectConfiguration accessToken(AccessTokenConfiguration accessToken) { @@ -519,6 +538,7 @@ public boolean equals(Object o) { Objects.equals(this.allowedOrigins, openIDConnectConfiguration.allowedOrigins) && Objects.equals(this.publicClient, openIDConnectConfiguration.publicClient) && Objects.equals(this.pkce, openIDConnectConfiguration.pkce) && + Objects.equals(this.hybridFlow, openIDConnectConfiguration.hybridFlow) && Objects.equals(this.accessToken, openIDConnectConfiguration.accessToken) && Objects.equals(this.refreshToken, openIDConnectConfiguration.refreshToken) && Objects.equals(this.subjectToken, openIDConnectConfiguration.subjectToken) && @@ -536,7 +556,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(clientId, clientSecret, state, grantTypes, callbackURLs, allowedOrigins, publicClient, pkce, accessToken, refreshToken, subjectToken, idToken, logout, validateRequestObjectSignature, scopeValidators, clientAuthentication, requestObject, pushAuthorizationRequest, subject, isFAPIApplication, fapiMetadata); + return Objects.hash(clientId, clientSecret, state, grantTypes, callbackURLs, allowedOrigins, publicClient, pkce, hybridFlow, accessToken, refreshToken, subjectToken, idToken, logout, validateRequestObjectSignature, scopeValidators, clientAuthentication, requestObject, pushAuthorizationRequest, subject, isFAPIApplication, fapiMetadata); } @Override @@ -553,6 +573,7 @@ public String toString() { sb.append(" allowedOrigins: ").append(toIndentedString(allowedOrigins)).append("\n"); sb.append(" publicClient: ").append(toIndentedString(publicClient)).append("\n"); sb.append(" pkce: ").append(toIndentedString(pkce)).append("\n"); + sb.append(" hybridFlow: ").append(toIndentedString(hybridFlow)).append("\n"); sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); sb.append(" refreshToken: ").append(toIndentedString(refreshToken)).append("\n"); sb.append(" subjectToken: ").append(toIndentedString(subjectToken)).append("\n"); From b97d4a7a617908617fc73f2a19a8ce94db5fe6b7 Mon Sep 17 00:00:00 2001 From: Asha Sulaiman <165079T@uom.lk> Date: Fri, 28 Jun 2024 12:11:52 +0530 Subject: [PATCH 2/2] upgrade api server version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 528a8aeb183..9f580ef08a8 100755 --- a/pom.xml +++ b/pom.xml @@ -2375,7 +2375,7 @@ 2.0.17 1.3.38 - 1.2.201 + 1.2.202 5.5.9 5.5.8