From 07fae6edffba0f70435731ff47f756a51a979082 Mon Sep 17 00:00:00 2001 From: jensp Date: Thu, 29 Aug 2019 08:52:02 +0000 Subject: [PATCH] SAML support for CCM git-svn-id: https://svn.libreccm.org/ccm/trunk@6168 8810af33-2d31-482b-a856-94f89814c4df --- .../com/arsdigita/kernel/security/SamlLoginModule.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ccm-core/src/com/arsdigita/kernel/security/SamlLoginModule.java b/ccm-core/src/com/arsdigita/kernel/security/SamlLoginModule.java index f8420d007..bd0e12ca0 100644 --- a/ccm-core/src/com/arsdigita/kernel/security/SamlLoginModule.java +++ b/ccm-core/src/com/arsdigita/kernel/security/SamlLoginModule.java @@ -87,6 +87,10 @@ public class SamlLoginModule implements LoginModule { @Override public boolean commit() throws LoginException { + + if (userId != null) { + subject.getPrincipals().add(new PartyPrincipal(userId)); + } return true; } @@ -97,6 +101,11 @@ public class SamlLoginModule implements LoginModule { @Override public boolean logout() throws LoginException { + + getRequest().getSession().invalidate(); + return true; + } + protected HttpServletRequest getRequest() throws LoginException { try {