Fix OS JCR authentication provider logging out unnecessarily
authorMathieu Baudier <mbaudier@argeo.org>
Tue, 19 Mar 2013 16:04:25 +0000 (16:04 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Tue, 19 Mar 2013 16:04:25 +0000 (16:04 +0000)
https://www.argeo.org/bugzilla/show_bug.cgi?id=146

git-svn-id: https://svn.argeo.org/commons/trunk@6170 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

security/runtime/org.argeo.security.core/src/main/java/org/argeo/security/jcr/OsJcrAuthenticationProvider.java

index c76ae9dafad7d56084ff8be00b46a2da47390b65..aa95e322d21ef8e8bfa6c05099e1f6d7b426a06b 100644 (file)
@@ -58,7 +58,8 @@ public class OsJcrAuthenticationProvider extends OsAuthenticationProvider {
                        throws AuthenticationException {
                if (authentication instanceof UsernamePasswordAuthenticationToken) {
                        // deal with remote access to internal server
-                       // FIXME very primitive and unsecure at this sSession adminSession =tage
+                       // FIXME very primitive and unsecure at this sSession adminSession
+                       // =tage
                        // consider using the keyring for username / password authentication
                        // or certificate
                        UsernamePasswordAuthenticationToken upat = (UsernamePasswordAuthenticationToken) authentication;
@@ -90,8 +91,6 @@ public class OsJcrAuthenticationProvider extends OsAuthenticationProvider {
                                throw new ArgeoException(
                                                "Unexpected exception when synchronizing OS and JCR security ",
                                                e);
-                       } finally {
-                               JcrUtils.logoutQuietly(nodeSession);
                        }
                } else {
                        throw new ArgeoException("Unsupported authentication "