diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.common/src/main/java/org/wso2/carbon/identity/api/server/application/management/common/ApplicationManagementConstants.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.common/src/main/java/org/wso2/carbon/identity/api/server/application/management/common/ApplicationManagementConstants.java index 9e67baff43..f6f71ce81a 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.common/src/main/java/org/wso2/carbon/identity/api/server/application/management/common/ApplicationManagementConstants.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.common/src/main/java/org/wso2/carbon/identity/api/server/application/management/common/ApplicationManagementConstants.java @@ -70,6 +70,8 @@ private ApplicationManagementConstants() { public static final String FAPI_ALLOWED_CLIENT_AUTHENTICATION_METHODS = "OAuth.OpenIDConnect.FAPI." + "AllowedClientAuthenticationMethods.AllowedClientAuthenticationMethod"; public static final String RSA1_5 = "RSA1_5"; + public static final String PROP_LOGOUT_RETURN_URL = "logoutReturnURL"; + public static final String LOGOUT_RETURN_URL_DISPLAY_NAME = "Logout Return URL"; public static final String NON_EXISTING_USER_CODE = "30007 - "; diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationListItem.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationListItem.java index ec7f193f29..dfcd735a0e 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationListItem.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationListItem.java @@ -39,6 +39,7 @@ public class ApplicationListItem { private String description; private String image; private String accessUrl; + private String logoutReturnUrl; private String clientId; private String issuer; private String realm; @@ -171,6 +172,24 @@ public void setAccessUrl(String accessUrl) { this.accessUrl = accessUrl; } + /** + **/ + public ApplicationListItem logoutReturnUrl(String logoutReturnUrl) { + + this.logoutReturnUrl = logoutReturnUrl; + return this; + } + + @ApiModelProperty(example = "https://example.com/app/logout", value = "") + @JsonProperty("logoutReturnUrl") + @Valid + public String getLogoutReturnUrl() { + return logoutReturnUrl; + } + public void setLogoutReturnUrl(String logoutReturnUrl) { + this.logoutReturnUrl = logoutReturnUrl; + } + /** **/ public ApplicationListItem clientId(String clientId) { @@ -332,6 +351,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.description, applicationListItem.description) && Objects.equals(this.image, applicationListItem.image) && Objects.equals(this.accessUrl, applicationListItem.accessUrl) && + Objects.equals(this.logoutReturnUrl, applicationListItem.logoutReturnUrl) && Objects.equals(this.clientId, applicationListItem.clientId) && Objects.equals(this.issuer, applicationListItem.issuer) && Objects.equals(this.realm, applicationListItem.realm) && @@ -344,7 +364,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(id, name, description, image, accessUrl, clientId, issuer, realm, access, self, advancedConfigurations, templateId, associatedRoles); + return Objects.hash(id, name, description, image, accessUrl, logoutReturnUrl, clientId, issuer, realm, access, self, advancedConfigurations, templateId, associatedRoles); } @Override @@ -358,6 +378,7 @@ public String toString() { sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" image: ").append(toIndentedString(image)).append("\n"); sb.append(" accessUrl: ").append(toIndentedString(accessUrl)).append("\n"); + sb.append(" logoutReturnUrl: ").append(toIndentedString(logoutReturnUrl)).append("\n"); sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); sb.append(" issuer: ").append(toIndentedString(issuer)).append("\n"); sb.append(" realm: ").append(toIndentedString(realm)).append("\n"); diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationModel.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationModel.java index ae72d5f23e..98756e47e8 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationModel.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationModel.java @@ -43,6 +43,7 @@ public class ApplicationModel { private String description; private String imageUrl; private String accessUrl; + private String logoutReturnUrl; private String templateId; private Boolean isManagementApp = false; private Boolean isB2BSelfServiceApp = false; @@ -145,6 +146,24 @@ public void setAccessUrl(String accessUrl) { this.accessUrl = accessUrl; } + /** + **/ + public ApplicationModel logoutReturnUrl(String logoutReturnUrl) { + + this.logoutReturnUrl = logoutReturnUrl; + return this; + } + + @ApiModelProperty(example = "https://example.com/app/logout", value = "") + @JsonProperty("logoutReturnUrl") + @Valid + public String getLogoutReturnUrl() { + return logoutReturnUrl; + } + public void setLogoutReturnUrl(String logoutReturnUrl) { + this.logoutReturnUrl = logoutReturnUrl; + } + /** **/ public ApplicationModel templateId(String templateId) { @@ -171,7 +190,7 @@ public ApplicationModel isManagementApp(Boolean isManagementApp) { this.isManagementApp = isManagementApp; return this; } - + @ApiModelProperty(example = "false", value = "Decides whether the application used to access System APIs") @JsonProperty("isManagementApp") @Valid @@ -190,12 +209,11 @@ public ApplicationModel isB2BSelfServiceApp(Boolean isB2BSelfServiceApp) { this.isB2BSelfServiceApp = isB2BSelfServiceApp; return this; } - + @ApiModelProperty(example = "false", value = "Decides whether the application used to for B2B self service") @JsonProperty("isB2BSelfServiceApp") @Valid public Boolean getIsB2BSelfServiceApp() { - return isB2BSelfServiceApp; } public void setIsB2BSelfServiceApp(Boolean isB2BSelfServiceApp) { @@ -327,6 +345,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.description, applicationModel.description) && Objects.equals(this.imageUrl, applicationModel.imageUrl) && Objects.equals(this.accessUrl, applicationModel.accessUrl) && + Objects.equals(this.logoutReturnUrl, applicationModel.logoutReturnUrl) && Objects.equals(this.templateId, applicationModel.templateId) && Objects.equals(this.isManagementApp, applicationModel.isManagementApp) && Objects.equals(this.isB2BSelfServiceApp, applicationModel.isB2BSelfServiceApp) && @@ -340,7 +359,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(id, name, description, imageUrl, accessUrl, templateId, isManagementApp, isB2BSelfServiceApp, associatedRoles, claimConfiguration, inboundProtocolConfiguration, authenticationSequence, advancedConfigurations, provisioningConfigurations); + return Objects.hash(id, name, description, imageUrl, accessUrl, logoutReturnUrl, templateId, isManagementApp, isB2BSelfServiceApp, associatedRoles, claimConfiguration, inboundProtocolConfiguration, authenticationSequence, advancedConfigurations, provisioningConfigurations); } @Override @@ -354,6 +373,7 @@ public String toString() { sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); sb.append(" accessUrl: ").append(toIndentedString(accessUrl)).append("\n"); + sb.append(" logoutReturnUrl: ").append(toIndentedString(logoutReturnUrl)).append("\n"); sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); sb.append(" isManagementApp: ").append(toIndentedString(isManagementApp)).append("\n"); sb.append(" isB2BSelfServiceApp: ").append(toIndentedString(isB2BSelfServiceApp)).append("\n"); diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationPatchModel.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationPatchModel.java index 1d91ea8ade..a783f12faf 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationPatchModel.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationPatchModel.java @@ -41,6 +41,7 @@ public class ApplicationPatchModel { private String description; private String imageUrl; private String accessUrl; + private String logoutReturnUrl; private String templateId; private AssociatedRolesConfig associatedRoles; private ClaimConfiguration claimConfiguration; @@ -120,6 +121,24 @@ public void setAccessUrl(String accessUrl) { this.accessUrl = accessUrl; } + /** + **/ + public ApplicationPatchModel logoutReturnUrl(String logoutReturnUrl) { + + this.logoutReturnUrl = logoutReturnUrl; + return this; + } + + @ApiModelProperty(example = "https://example.com/app/logout", value = "") + @JsonProperty("logoutReturnUrl") + @Valid + public String getLogoutReturnUrl() { + return logoutReturnUrl; + } + public void setLogoutReturnUrl(String logoutReturnUrl) { + this.logoutReturnUrl = logoutReturnUrl; + } + /** **/ public ApplicationPatchModel templateId(String templateId) { @@ -244,6 +263,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.description, applicationPatchModel.description) && Objects.equals(this.imageUrl, applicationPatchModel.imageUrl) && Objects.equals(this.accessUrl, applicationPatchModel.accessUrl) && + Objects.equals(this.logoutReturnUrl, applicationPatchModel.logoutReturnUrl) && Objects.equals(this.templateId, applicationPatchModel.templateId) && Objects.equals(this.associatedRoles, applicationPatchModel.associatedRoles) && Objects.equals(this.claimConfiguration, applicationPatchModel.claimConfiguration) && @@ -254,7 +274,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(name, description, imageUrl, accessUrl, templateId, associatedRoles, claimConfiguration, authenticationSequence, advancedConfigurations, provisioningConfigurations); + return Objects.hash(name, description, imageUrl, accessUrl, logoutReturnUrl, templateId, associatedRoles, claimConfiguration, authenticationSequence, advancedConfigurations, provisioningConfigurations); } @Override @@ -267,6 +287,7 @@ public String toString() { sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); sb.append(" accessUrl: ").append(toIndentedString(accessUrl)).append("\n"); + sb.append(" logoutReturnUrl: ").append(toIndentedString(logoutReturnUrl)).append("\n"); sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); sb.append(" associatedRoles: ").append(toIndentedString(associatedRoles)).append("\n"); sb.append(" claimConfiguration: ").append(toIndentedString(claimConfiguration)).append("\n"); diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationResponseModel.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationResponseModel.java index bdc04076c5..69ac04a85b 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationResponseModel.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationResponseModel.java @@ -45,6 +45,7 @@ public class ApplicationResponseModel { private String description; private String imageUrl; private String accessUrl; + private String logoutReturnUrl; private String clientId; private String issuer; private String realm; @@ -185,6 +186,24 @@ public void setAccessUrl(String accessUrl) { this.accessUrl = accessUrl; } + /** + **/ + public ApplicationResponseModel logoutReturnUrl(String logoutReturnUrl) { + + this.logoutReturnUrl = logoutReturnUrl; + return this; + } + + @ApiModelProperty(example = "https://example.com/app/logout", value = "") + @JsonProperty("logoutReturnUrl") + @Valid + public String getLogoutReturnUrl() { + return logoutReturnUrl; + } + public void setLogoutReturnUrl(String logoutReturnUrl) { + this.logoutReturnUrl = logoutReturnUrl; + } + /** **/ public ApplicationResponseModel clientId(String clientId) { @@ -446,6 +465,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.description, applicationResponseModel.description) && Objects.equals(this.imageUrl, applicationResponseModel.imageUrl) && Objects.equals(this.accessUrl, applicationResponseModel.accessUrl) && + Objects.equals(this.logoutReturnUrl, applicationResponseModel.logoutReturnUrl) && Objects.equals(this.clientId, applicationResponseModel.clientId) && Objects.equals(this.issuer, applicationResponseModel.issuer) && Objects.equals(this.realm, applicationResponseModel.realm) && @@ -463,7 +483,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(id, name, description, imageUrl, accessUrl, clientId, issuer, realm, templateId, isManagementApp, isB2BSelfServiceApp, associatedRoles, claimConfiguration, inboundProtocols, authenticationSequence, advancedConfigurations, provisioningConfigurations, access); + return Objects.hash(id, name, description, imageUrl, accessUrl, logoutReturnUrl, clientId, issuer, realm, templateId, isManagementApp, isB2BSelfServiceApp, associatedRoles, claimConfiguration, inboundProtocols, authenticationSequence, advancedConfigurations, provisioningConfigurations, access); } @Override @@ -477,6 +497,7 @@ public String toString() { sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); sb.append(" accessUrl: ").append(toIndentedString(accessUrl)).append("\n"); + sb.append(" logoutReturnUrl: ").append(toIndentedString(logoutReturnUrl)).append("\n"); sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); sb.append(" issuer: ").append(toIndentedString(issuer)).append("\n"); sb.append(" realm: ").append(toIndentedString(realm)).append("\n"); diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ApiModelToServiceProvider.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ApiModelToServiceProvider.java index 3022158e75..c03cdc70b0 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ApiModelToServiceProvider.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ApiModelToServiceProvider.java @@ -57,9 +57,17 @@ public ServiceProvider apply(ApplicationModel applicationModel) { addProvisioningConfiguration(application, applicationModel.getProvisioningConfigurations()); addInboundAuthenticationProtocolsToApplication(application, applicationModel.getInboundProtocolConfiguration()); addAssociatedRolesConfigurations(application, applicationModel.getAssociatedRoles()); + addLogoutReturnUrl(application, applicationModel.getLogoutReturnUrl()); return application; } + private void addLogoutReturnUrl(ServiceProvider application, String logoutReturnUrl) { + + if (logoutReturnUrl != null) { + new UpdateLogoutReturnUrl().apply(application, logoutReturnUrl); + } + } + private void addAssociatedRolesConfigurations(ServiceProvider application, AssociatedRolesConfig associatedRoles) { if (associatedRoles != null) { diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ServiceProviderToApiModel.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ServiceProviderToApiModel.java index 656259ff49..eefdbe4408 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ServiceProviderToApiModel.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ServiceProviderToApiModel.java @@ -22,6 +22,7 @@ import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.identity.api.server.application.management.common.ApplicationManagementConstants; import org.wso2.carbon.identity.api.server.application.management.common.ApplicationManagementServiceHolder; import org.wso2.carbon.identity.api.server.application.management.v1.AdditionalSpProperty; import org.wso2.carbon.identity.api.server.application.management.v1.AdvancedApplicationConfiguration; @@ -120,6 +121,7 @@ public ApplicationResponseModel apply(ServiceProvider application) { .description(application.getDescription()) .imageUrl(application.getImageUrl()) .accessUrl(application.getAccessUrl()) + .logoutReturnUrl(loadLogoutReturnUrl(application)) .clientId(getInboundKey(application, "oauth2")) .issuer(getInboundKey(application, "samlsso")) .realm(getInboundKey(application, "passivests")) @@ -135,6 +137,16 @@ public ApplicationResponseModel apply(ServiceProvider application) { } } + private String loadLogoutReturnUrl(ServiceProvider application) { + + for (ServiceProviderProperty property : application.getSpProperties()) { + if (ApplicationManagementConstants.PROP_LOGOUT_RETURN_URL.equals(property.getName())) { + return property.getValue(); + } + } + return null; + } + private AssociatedRolesConfig buildAssociatedRoles(ServiceProvider application) { AssociatedRolesConfig associatedRolesConfig = new AssociatedRolesConfig(); diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/UpdateLogoutReturnUrl.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/UpdateLogoutReturnUrl.java new file mode 100644 index 0000000000..d9ca0b1322 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/UpdateLogoutReturnUrl.java @@ -0,0 +1,40 @@ +package org.wso2.carbon.identity.api.server.application.management.v1.core.functions.application; + +import org.wso2.carbon.identity.api.server.application.management.common.ApplicationManagementConstants; +import org.wso2.carbon.identity.api.server.application.management.v1.core.functions.UpdateFunction; +import org.wso2.carbon.identity.application.common.model.ServiceProvider; +import org.wso2.carbon.identity.application.common.model.ServiceProviderProperty; + +import java.util.Arrays; + +/** + * Update logout return url. + */ +public class UpdateLogoutReturnUrl implements UpdateFunction { + + @Override + public void apply(ServiceProvider serviceProvider, String logoutReturnUrl) { + + ServiceProviderProperty[] spProperties = serviceProvider.getSpProperties(); + boolean logoutURLExists = false; + + if (spProperties == null) { + spProperties = new ServiceProviderProperty[0]; + } + for (ServiceProviderProperty spProperty : spProperties) { + if (ApplicationManagementConstants.PROP_LOGOUT_RETURN_URL.equals(spProperty.getName())) { + spProperty.setValue(logoutReturnUrl); + logoutURLExists = true; + } + } + if (!logoutURLExists) { + ServiceProviderProperty logoutURLProperty = new ServiceProviderProperty(); + logoutURLProperty.setName(ApplicationManagementConstants.PROP_LOGOUT_RETURN_URL); + logoutURLProperty.setValue(logoutReturnUrl); + logoutURLProperty.setDisplayName(ApplicationManagementConstants.LOGOUT_RETURN_URL_DISPLAY_NAME); + spProperties = Arrays.copyOf(spProperties, spProperties.length + 1); + spProperties[spProperties.length - 1] = logoutURLProperty; + } + serviceProvider.setSpProperties(spProperties); + } +} diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/UpdateServiceProvider.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/UpdateServiceProvider.java index 1e35189e54..e87dbd7c23 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/UpdateServiceProvider.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/UpdateServiceProvider.java @@ -48,6 +48,14 @@ public void apply(ServiceProvider serviceProvider, ApplicationPatchModel applica patchAuthenticationSequence(applicationPatchModel.getAuthenticationSequence(), serviceProvider); patchAdvancedConfiguration(serviceProvider, applicationPatchModel.getAdvancedConfigurations()); patchProvisioningConfiguration(applicationPatchModel.getProvisioningConfigurations(), serviceProvider); + patchLogoutReturnUrl(serviceProvider, applicationPatchModel.getLogoutReturnUrl()); + } + + private void patchLogoutReturnUrl(ServiceProvider application, String logoutReturnUrl) { + + if (logoutReturnUrl != null) { + new UpdateLogoutReturnUrl().apply(application, logoutReturnUrl); + } } private void patchAssociatedRolesConfigurations(ServiceProvider serviceProvider, diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/resources/applications.yaml b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/resources/applications.yaml index d96cd35eac..006ccb6243 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/resources/applications.yaml +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/resources/applications.yaml @@ -2807,6 +2807,9 @@ components: accessUrl: type: string example: 'https://example.com/app/login' + logoutReturnUrl: + type: string + example: 'https://example.com/app/logout' clientId: type: string example: 'SmrrDNXRYf1lMmDlnleeHTuXx_Ea' @@ -2854,6 +2857,9 @@ components: accessUrl: type: string example: 'https://example.com/login' + logoutReturnUrl: + type: string + example: 'https://example.com/app/logout' templateId: type: string example: "980b8tester24c64a8a09a0d80abf8c337bd2555" @@ -2900,6 +2906,9 @@ components: accessUrl: type: string example: 'https://example.com/login' + logoutReturnUrl: + type: string + example: 'https://example.com/app/logout' clientId: type: string example: 'SmrrDNXRYf1lMmDlnleeHTuXx_Ea' @@ -2954,6 +2963,9 @@ components: accessUrl: type: string example: 'https://example.com/login' + logoutReturnUrl: + type: string + example: 'https://example.com/app/logout' templateId: type: string example: "adwefi2429asdfdf94444rraf44"