From 1715be23083a145a6ffb96035d4544a65c5ce44a Mon Sep 17 00:00:00 2001 From: Bill Burke Date: Mon, 16 Mar 2015 14:52:29 -0400 Subject: [PATCH] set saml issuer --- .../src/main/java/org/keycloak/protocol/saml/SamlProtocol.java | 2 ++ .../test/java/org/keycloak/testsuite/account/AccountTest.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/saml/saml-protocol/src/main/java/org/keycloak/protocol/saml/SamlProtocol.java b/saml/saml-protocol/src/main/java/org/keycloak/protocol/saml/SamlProtocol.java index 0e4b089385..34b688c477 100755 --- a/saml/saml-protocol/src/main/java/org/keycloak/protocol/saml/SamlProtocol.java +++ b/saml/saml-protocol/src/main/java/org/keycloak/protocol/saml/SamlProtocol.java @@ -463,6 +463,7 @@ public class SamlProtocol implements LoginProtocol { SAML2LogoutResponseBuilder builder = new SAML2LogoutResponseBuilder(); builder.logoutRequestID(userSession.getNote(SAML_LOGOUT_REQUEST_ID)); builder.destination(userSession.getNote(SAML_LOGOUT_ISSUER)); + builder.issuer(getResponseIssuer(realm)); String signingAlgorithm = userSession.getNote(SAML_LOGOUT_SIGNATURE_ALGORITHM); if (signingAlgorithm != null) { SignatureAlgorithm algorithm = SignatureAlgorithm.valueOf(signingAlgorithm); @@ -546,6 +547,7 @@ public class SamlProtocol implements LoginProtocol { protected SAML2LogoutRequestBuilder createLogoutRequest(ClientSessionModel clientSession, ClientModel client) { // build userPrincipal with subject used at login SAML2LogoutRequestBuilder logoutBuilder = new SAML2LogoutRequestBuilder() + .issuer(getResponseIssuer(realm)) .userPrincipal(clientSession.getNote(SAML_NAME_ID), clientSession.getNote(SAML_NAME_ID_FORMAT)) .destination(client.getClientId()); if (requiresRealmSignature(client)) { diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/account/AccountTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/account/AccountTest.java index fb782990b6..4743826502 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/account/AccountTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/account/AccountTest.java @@ -157,7 +157,7 @@ public class AccountTest { }); } - @Test @Ignore + //@Test @Ignore public void runit() throws Exception { Thread.sleep(10000000); }