From ad2068f4d3434e05025ff164123b4ab893a7feb9 Mon Sep 17 00:00:00 2001 From: Rolain Djeumen Date: Mon, 15 Apr 2024 13:52:16 +0100 Subject: [PATCH] feat(oxtrust): added support for sp logout return url Signed-off-by: Rolain Djeumen --- .../oxtrust/model/GluuSAMLTrustRelationship.java | 15 +++++++++++++++ server/src/main/resources/oxtrust.properties | 1 + server/src/main/resources/oxtrust_en.properties | 1 + server/src/main/resources/oxtrust_fr.properties | 1 + server/src/main/resources/oxtrust_ru.properties | 1 + .../WEB-INF/incl/trustmanager/trustForm.xhtml | 8 ++++++++ 6 files changed, 27 insertions(+) diff --git a/model/src/main/java/org/gluu/oxtrust/model/GluuSAMLTrustRelationship.java b/model/src/main/java/org/gluu/oxtrust/model/GluuSAMLTrustRelationship.java index 765f96ca3..b7ef8823a 100644 --- a/model/src/main/java/org/gluu/oxtrust/model/GluuSAMLTrustRelationship.java +++ b/model/src/main/java/org/gluu/oxtrust/model/GluuSAMLTrustRelationship.java @@ -127,6 +127,10 @@ public class GluuSAMLTrustRelationship extends InumEntry implements Serializable @AttributeName(name = "oxAuthPostLogoutRedirectURI") private String spLogoutURL; + @Pattern(regexp = "^$|(^(https?|http)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|])", message = "Please enter a valid url, including protocol (http/https)") + @AttributeName(name="spLogoutRedirectUrl") + private String spLogoutRedirectUrl; + @AttributeName(name = "gluuValidationLog") private List validationLog; @@ -367,6 +371,17 @@ public void setSpLogoutURL(String spLogoutURL) { this.spLogoutURL = spLogoutURL; } + public String getSpLogoutRedirectUrl() { + + + return spLogoutRedirectUrl; + } + + public void setSpLogoutRedirectUrl(String spLogoutRedirectUrl) { + + this.spLogoutRedirectUrl = spLogoutRedirectUrl; + } + public String getSpMetaDataFN() { return spMetaDataFN; } diff --git a/server/src/main/resources/oxtrust.properties b/server/src/main/resources/oxtrust.properties index 422b76384..f37c66aff 100644 --- a/server/src/main/resources/oxtrust.properties +++ b/server/src/main/resources/oxtrust.properties @@ -713,6 +713,7 @@ trustmanager.entityID = Entity ID trustmanager.spMetadataFile = Sp Metadata File trustmanager.spMetadataURL = Sp Metadata URL trustmanager.spLogoutURL = SP Logout URL (optional) +trustmanager.spLogoutRedirectUrl= SP Logout Redirect URL (optional) trustmanager.configureRelyingParty = Configure Relying Party trustmanager.enableInCommon = Enable InCommon R&S trustmanager.released = Released diff --git a/server/src/main/resources/oxtrust_en.properties b/server/src/main/resources/oxtrust_en.properties index 822f33e70..fe6144ddf 100644 --- a/server/src/main/resources/oxtrust_en.properties +++ b/server/src/main/resources/oxtrust_en.properties @@ -724,6 +724,7 @@ trustmanager.entityID = Entity ID trustmanager.spMetadataFile = Sp Metadata File trustmanager.spMetadataURL = Sp Metadata URL trustmanager.spLogoutURL = SP Logout URL (optional) +trustmanager.spLogoutRedirectUrl= SP Logout Redirect URL (optional) trustmanager.configureRelyingParty = Configure Relying Party trustmanager.enableInCommon = Enable InCommon R&S trustmanager.released = Released diff --git a/server/src/main/resources/oxtrust_fr.properties b/server/src/main/resources/oxtrust_fr.properties index 28ca8bf3f..99868f422 100644 --- a/server/src/main/resources/oxtrust_fr.properties +++ b/server/src/main/resources/oxtrust_fr.properties @@ -705,6 +705,7 @@ trustmanager.entityID = Entity ID trustmanager.spMetadataFile = Sp Metadata File trustmanager.spMetadataURL = Sp Metadata URL trustmanager.spLogoutURL = SP Logout URL (optional) +trustmanager.spLogoutRedirectUrl= SP Logout Redirect URL (optional) trustmanager.configureRelyingParty = Configurer un Relying Party trustmanager.enableInCommon = Activé InCommon R&S trustmanager.released = Libéré diff --git a/server/src/main/resources/oxtrust_ru.properties b/server/src/main/resources/oxtrust_ru.properties index a2cebc7ee..9872f9fbd 100644 --- a/server/src/main/resources/oxtrust_ru.properties +++ b/server/src/main/resources/oxtrust_ru.properties @@ -675,6 +675,7 @@ trustmanager.entityID = Entity ID trustmanager.spMetadataFile = Sp Metadata File trustmanager.spMetadataURL = Sp Metadata URL trustmanager.spLogoutURL = SP Logout URL (optional) +trustmanager.spLogoutRedirectUrl= SP Logout Redirect URL (optional) trustmanager.configureRelyingParty = Configure Relying Party trustmanager.enableInCommon = Enable InCommon R&S trustmanager.released = Released diff --git a/server/src/main/webapp/WEB-INF/incl/trustmanager/trustForm.xhtml b/server/src/main/webapp/WEB-INF/incl/trustmanager/trustForm.xhtml index a3b192272..3fba12955 100644 --- a/server/src/main/webapp/WEB-INF/incl/trustmanager/trustForm.xhtml +++ b/server/src/main/webapp/WEB-INF/incl/trustmanager/trustForm.xhtml @@ -310,6 +310,14 @@ input[submit] { id="spLogoutURLId" /> + + + + +