From 8d24027443ec87c302a9100559aa62c59f8a7633 Mon Sep 17 00:00:00 2001 From: Ben Alex Date: Sun, 28 Mar 2004 11:56:32 +0000 Subject: [PATCH] Added debug statement at commencement of interception and additional comment re ContextHolder. --- .../main/java/org/acegisecurity/SecurityInterceptor.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/main/java/org/acegisecurity/SecurityInterceptor.java b/core/src/main/java/org/acegisecurity/SecurityInterceptor.java index c6563faeae..f61f3fab24 100644 --- a/core/src/main/java/org/acegisecurity/SecurityInterceptor.java +++ b/core/src/main/java/org/acegisecurity/SecurityInterceptor.java @@ -207,6 +207,10 @@ public class SecurityInterceptor implements MethodInterceptor, InitializingBean * Authentication object */ public Object invoke(MethodInvocation mi) throws Throwable { + if (logger.isDebugEnabled()) { + logger.debug("Intercepted request for method " + mi.getMethod()); + } + ConfigAttributeDefinition attr = this.methodDefinitionSource .getAttributes(mi); @@ -225,6 +229,8 @@ public class SecurityInterceptor implements MethodInterceptor, InitializingBean SecureContext context = (SecureContext) ContextHolder.getContext(); + // We check for just the property we're interested in (we do + // not call Context.validate() like the ContextInterceptor) if (context.getAuthentication() == null) { throw new AuthenticationCredentialsNotFoundException( "Authentication credentials were not found in the SecureContext");