[jboss-cvs] JBossAS SVN: r108939 - in projects/security/security-negotiation/trunk: jboss-negotiation-common/src/main/java/org/jboss/security/negotiation and 7 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Oct 27 14:00:51 EDT 2010
Author: mmoyses
Date: 2010-10-27 14:00:48 -0400 (Wed, 27 Oct 2010)
New Revision: 108939
Modified:
projects/security/security-negotiation/trunk/jboss-negotiation-common/pom.xml
projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/MessageFactory.java
projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/NegotiationAuthenticator.java
projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/NegotiationMessage.java
projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/common/NegotiationContext.java
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedADLoginModule.java
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
projects/security/security-negotiation/trunk/jboss-negotiation-ntlm/src/tests/java/org/jboss/security/negotiation/ntlm/encoding/NegotiationMessageDecoderTest.java
projects/security/security-negotiation/trunk/jboss-negotiation-spnego/pom.xml
projects/security/security-negotiation/trunk/jboss-negotiation-spnego/src/main/java/org/jboss/security/negotiation/spnego/SPNEGOLoginModule.java
projects/security/security-negotiation/trunk/jboss-negotiation-spnego/src/tests/java/org/jboss/security/negotiation/spnego/encoding/Security439TestCase.java
projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/src/main/java/org/jboss/security/negotiation/toolkit/BasicNegotiationServlet.java
projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/src/main/java/org/jboss/security/negotiation/toolkit/NTLMNegotiationServlet.java
projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/src/main/java/org/jboss/security/negotiation/toolkit/SecurityDomainTestServlet.java
Log:
Adding log level checking before logging and replacing org.jboss.util.Base64 with the class from picketbox-commons
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-common/pom.xml
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-common/pom.xml 2010-10-27 17:57:33 UTC (rev 108938)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-common/pom.xml 2010-10-27 18:00:48 UTC (rev 108939)
@@ -49,6 +49,10 @@
<groupId>jboss.web</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.picketbox</groupId>
+ <artifactId>picketbox-commons</artifactId>
+ </dependency>
</dependencies>
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/MessageFactory.java
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/MessageFactory.java 2010-10-27 17:57:33 UTC (rev 108938)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/MessageFactory.java 2010-10-27 18:00:48 UTC (rev 108939)
@@ -65,7 +65,8 @@
}
catch (Exception e)
{
- log.trace("Unable to load class '" + classname + "'", e);
+ if (log.isTraceEnabled())
+ log.trace("Unable to load class '" + classname + "'", e);
}
return clazz;
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/NegotiationAuthenticator.java
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/NegotiationAuthenticator.java 2010-10-27 17:57:33 UTC (rev 108938)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/NegotiationAuthenticator.java 2010-10-27 18:00:48 UTC (rev 108939)
@@ -36,7 +36,7 @@
import org.apache.log4j.Logger;
import org.jboss.security.negotiation.common.MessageTrace;
import org.jboss.security.negotiation.common.NegotiationContext;
-import org.jboss.util.Base64;
+import org.picketbox.commons.cipher.Base64;
/**
* An authenticator to manage Negotiation based authentication in connection with the
@@ -63,7 +63,8 @@
protected boolean authenticate(final Request request, final Response response, final LoginConfig config)
throws IOException
{
- log.trace("Authenticating user");
+ if (log.isTraceEnabled())
+ log.trace("Authenticating user");
Principal principal = request.getUserPrincipal();
if (principal != null)
@@ -75,11 +76,13 @@
String negotiateScheme = getNegotiateScheme();
- log.debug("Header - " + request.getHeader("Authorization"));
+ if (log.isDebugEnabled())
+ log.debug("Header - " + request.getHeader("Authorization"));
String authHeader = request.getHeader("Authorization");
if (authHeader == null)
{
- log.debug("No Authorization Header, sending 401");
+ if (log.isDebugEnabled())
+ log.debug("No Authorization Header, sending 401");
response.setHeader("WWW-Authenticate", negotiateScheme);
response.sendError(401);
@@ -100,11 +103,10 @@
NegotiationContext negotiationContext = (NegotiationContext) session.getNote(NEGOTIATION_CONTEXT);
if (negotiationContext == null)
{
- log.debug("Creating new NegotiationContext");
- {
- negotiationContext = new NegotiationContext();
- session.setNote(NEGOTIATION_CONTEXT, negotiationContext);
- }
+ if (log.isDebugEnabled())
+ log.debug("Creating new NegotiationContext");
+ negotiationContext = new NegotiationContext();
+ session.setNote(NEGOTIATION_CONTEXT, negotiationContext);
}
String username = session.getId();
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/NegotiationMessage.java
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/NegotiationMessage.java 2010-10-27 17:57:33 UTC (rev 108938)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/NegotiationMessage.java 2010-10-27 18:00:48 UTC (rev 108939)
@@ -20,7 +20,7 @@
import java.io.IOException;
import java.io.OutputStream;
-import org.jboss.util.Base64;
+import org.picketbox.commons.cipher.Base64;
/**
* The common base type for all negotiation messages.
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/common/NegotiationContext.java
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/common/NegotiationContext.java 2010-10-27 17:57:33 UTC (rev 108938)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/common/NegotiationContext.java 2010-10-27 18:00:48 UTC (rev 108939)
@@ -57,7 +57,8 @@
public void associate()
{
- log.trace("associate " + this.hashCode());
+ if (log.isTraceEnabled())
+ log.trace("associate " + this.hashCode());
negotiationContext.set(this);
}
@@ -66,7 +67,8 @@
*/
public void clear()
{
- log.trace("clear " + this.hashCode());
+ if (log.isTraceEnabled())
+ log.trace("clear " + this.hashCode());
requestMessage = null;
responseMessage = null;
negotiationContext.remove();
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedADLoginModule.java
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedADLoginModule.java 2010-10-27 17:57:33 UTC (rev 108938)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedADLoginModule.java 2010-10-27 18:00:48 UTC (rev 108939)
@@ -34,7 +34,7 @@
import javax.naming.ldap.LdapContext;
import javax.security.auth.login.LoginException;
-import org.jboss.util.Base64;
+import org.picketbox.commons.cipher.Base64;
/**
* An extension of the AdvancedLdapLoginModule to also query the primary group
@@ -128,14 +128,16 @@
}
else
{
- log.trace("primaryGroupIdAttribute or objectSidAttribute was null, skipping primary group search.");
+ if (log.isTraceEnabled())
+ log.trace("primaryGroupIdAttribute or objectSidAttribute was null, skipping primary group search.");
}
super.rolesSearch(searchContext, dn);
}
catch (NamingException e)
{
- log.trace("Failed to load primary group", e);
+ if (log.isTraceEnabled())
+ log.trace("Failed to load primary group", e);
}
finally
{
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java 2010-10-27 17:57:33 UTC (rev 108938)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java 2010-10-27 18:00:48 UTC (rev 108939)
@@ -265,7 +265,8 @@
AuthorizeAction action = new AuthorizeAction();
if (AUTH_TYPE_GSSAPI.equals(bindAuthentication))
{
- log.trace("Using GSSAPI to connect to LDAP");
+ if (log.isTraceEnabled())
+ log.trace("Using GSSAPI to connect to LDAP");
LoginContext lc = new LoginContext(jaasSecurityDomain);
lc.login();
Subject serverSubject = lc.getSubject();
@@ -310,7 +311,8 @@
{
// Obtain the username and password
processIdentityAndCredential();
- log.trace("Identity - " + getIdentity().getName());
+ if (log.isTraceEnabled())
+ log.trace("Identity - " + getIdentity().getName());
// Initialise search ctx
String bindCredential = this.bindCredential;
if (AUTH_TYPE_GSSAPI.equals(bindAuthentication) == false)
@@ -337,7 +339,8 @@
try
{
searchContext = constructLdapContext(bindDn, bindCredential, bindAuthentication);
- log.debug("Obtained LdapContext");
+ if (log.isDebugEnabled())
+ log.debug("Obtained LdapContext");
// Search for user in LDAP
String userDN = findUserDN(searchContext);
@@ -392,7 +395,8 @@
}
catch (Exception e)
{
- log.debug("Failed to create principal", e);
+ if (log.isDebugEnabled())
+ log.debug("Failed to create principal", e);
throw new LoginException("Failed to create principal: " + e.getMessage());
}
}
@@ -527,7 +531,8 @@
results.close();
results = null;
- log.trace("findUserDN - " + userDN);
+ if (log.isTraceEnabled())
+ log.trace("findUserDN - " + userDN);
return userDN;
}
catch (NamingException e)
@@ -544,7 +549,8 @@
{
if (allowEmptyPassword == false)
{
- log.trace("Rejecting empty password.");
+ if (log.isTraceEnabled())
+ log.trace("Rejecting empty password.");
return;
}
}
@@ -556,7 +562,8 @@
}
catch (NamingException ne)
{
- log.debug("Authentication failed - " + ne.getMessage());
+ if (log.isDebugEnabled())
+ log.debug("Authentication failed - " + ne.getMessage());
LoginException le = new LoginException("Authentication failed");
le.initCause(ne);
throw le;
@@ -579,7 +586,8 @@
NamingEnumeration results = null;
try
{
- log.trace("rolesCtxDN=" + rolesCtxDN + " roleFilter=" + roleFilter + " filterArgs[0]=" + filterArgs[0]
+ if (log.isTraceEnabled())
+ log.trace("rolesCtxDN=" + rolesCtxDN + " roleFilter=" + roleFilter + " filterArgs[0]=" + filterArgs[0]
+ " filterArgs[1]=" + filterArgs[1]);
if (roleFilter != null && roleFilter.length() > 0)
@@ -624,7 +632,8 @@
protected void obtainRole(LdapContext searchContext, String dn) throws NamingException, LoginException
{
- log.trace("rolesSearch resultDN = " + dn);
+ if (log.isTraceEnabled())
+ log.trace("rolesSearch resultDN = " + dn);
String[] attrNames =
{roleAttributeID};
@@ -658,7 +667,8 @@
{
String[] returnAttribute =
{roleNameAttributeID};
- log.trace("Using roleDN: " + roleDN);
+ if (log.isTraceEnabled())
+ log.trace("Using roleDN: " + roleDN);
try
{
Attributes result2 = searchContext.getAttributes(roleDN, returnAttribute);
@@ -674,7 +684,8 @@
}
catch (NamingException e)
{
- log.trace("Failed to query roleNameAttrName", e);
+ if (log.isTraceEnabled())
+ log.trace("Failed to query roleNameAttrName", e);
}
}
@@ -685,12 +696,14 @@
if (processedRoleDNs.contains(roleDN) == false)
{
processedRoleDNs.add(roleDN);
- log.trace("Recursive search for '" + roleDN + "'");
+ if (log.isTraceEnabled())
+ log.trace("Recursive search for '" + roleDN + "'");
rolesSearch(searchContext, roleDN);
}
else
{
- log.trace("Already visited role '" + roleDN + "' ending recursion.");
+ if (log.isTraceEnabled())
+ log.trace("Already visited role '" + roleDN + "' ending recursion.");
}
}
}
@@ -737,7 +750,8 @@
}
catch (Exception e)
{
- log.debug("Failed to create principal: " + roleName, e);
+ if (log.isDebugEnabled())
+ log.debug("Failed to create principal: " + roleName, e);
}
}
}
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-ntlm/src/tests/java/org/jboss/security/negotiation/ntlm/encoding/NegotiationMessageDecoderTest.java
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-ntlm/src/tests/java/org/jboss/security/negotiation/ntlm/encoding/NegotiationMessageDecoderTest.java 2010-10-27 17:57:33 UTC (rev 108938)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-ntlm/src/tests/java/org/jboss/security/negotiation/ntlm/encoding/NegotiationMessageDecoderTest.java 2010-10-27 18:00:48 UTC (rev 108939)
@@ -18,7 +18,7 @@
import org.jboss.security.negotiation.ntlm.encoding.NegotiateMessage;
import org.jboss.security.negotiation.ntlm.encoding.NegotiateMessageDecoder;
-import org.jboss.util.Base64;
+import org.picketbox.commons.cipher.Base64;
import junit.framework.TestCase;
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-spnego/pom.xml
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-spnego/pom.xml 2010-10-27 17:57:33 UTC (rev 108938)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-spnego/pom.xml 2010-10-27 18:00:48 UTC (rev 108939)
@@ -39,10 +39,6 @@
<!-- Global dependencies -->
<dependency>
<groupId>jboss</groupId>
- <artifactId>jboss-common</artifactId>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
<artifactId>jbosssx</artifactId>
</dependency>
<dependency>
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-spnego/src/main/java/org/jboss/security/negotiation/spnego/SPNEGOLoginModule.java
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-spnego/src/main/java/org/jboss/security/negotiation/spnego/SPNEGOLoginModule.java 2010-10-27 17:57:33 UTC (rev 108938)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-spnego/src/main/java/org/jboss/security/negotiation/spnego/SPNEGOLoginModule.java 2010-10-27 18:00:48 UTC (rev 108939)
@@ -93,7 +93,8 @@
String temp;
// Which security domain to authenticate the server.
serverSecurityDomain = (String) options.get("serverSecurityDomain");
- log.debug("serverSecurityDomain=" + serverSecurityDomain);
+ if (log.isDebugEnabled())
+ log.debug("serverSecurityDomain=" + serverSecurityDomain);
temp = (String) options.get(REMOVE_REALM_FROM_PRINCIPAL);
removeRealmFromPrincipal = Boolean.valueOf(temp);
if (removeRealmFromPrincipal == false && principalClassName == null)
@@ -107,7 +108,8 @@
{
if (super.login() == true)
{
- log.debug("super.login()==true");
+ if (log.isDebugEnabled())
+ log.debug("super.login()==true");
return true;
}
@@ -128,7 +130,8 @@
AcceptSecContext action = new AcceptSecContext(negotiationContext);
Object result = Subject.doAs(server, action);
- log.trace("Result - " + result);
+ if (log.isTraceEnabled())
+ log.trace("Result - " + result);
if (result instanceof Boolean)
{
@@ -138,7 +141,8 @@
if (getUseFirstPass() == true)
{
String userName = identity.getName();
- log.debug("Storing username '" + userName + "' and empty password");
+ if (log.isDebugEnabled())
+ log.debug("Storing username '" + userName + "' and empty password");
// Add the username and a null password to the shared state map
sharedState.put("javax.security.auth.login.name", identity);
sharedState.put("javax.security.auth.login.password", "");
@@ -162,7 +166,8 @@
}
}
- log.trace("super.loginOk " + super.loginOk);
+ if (log.isTraceEnabled())
+ log.trace("super.loginOk " + super.loginOk);
if (super.loginOk == true)
{
return true;
@@ -214,8 +219,11 @@
serverLoginContext = lc;
Subject serverSubject = serverLoginContext.getSubject();
- log.debug("Subject = " + serverSubject);
- log.debug("Logged in '" + serverSecurityDomain + "' LoginContext");
+ if (log.isDebugEnabled())
+ {
+ log.debug("Subject = " + serverSubject);
+ log.debug("Logged in '" + serverSecurityDomain + "' LoginContext");
+ }
return serverSubject;
}
@@ -292,7 +300,8 @@
GSSContext gssContext = (GSSContext) schemeContext;
if (gssContext == null)
{
- log.debug("Creating new GSSContext.");
+ if (log.isDebugEnabled())
+ log.debug("Creating new GSSContext.");
GSSManager manager = GSSManager.getInstance();
gssContext = manager.createContext((GSSCredential) null);
@@ -306,9 +315,12 @@
// TODO - Refactor to only do this once.
identity = new KerberosPrincipal(gssContext.getSrcName().toString());
- log.debug("context.getCredDelegState() = " + gssContext.getCredDelegState());
- log.debug("context.getMutualAuthState() = " + gssContext.getMutualAuthState());
- log.debug("context.getSrcName() = " + gssContext.getSrcName().toString());
+ if (log.isDebugEnabled())
+ {
+ log.debug("context.getCredDelegState() = " + gssContext.getCredDelegState());
+ log.debug("context.getMutualAuthState() = " + gssContext.getMutualAuthState());
+ log.debug("context.getSrcName() = " + gssContext.getSrcName().toString());
+ }
negotiationContext.setAuthenticationMethod(SPNEGO);
negotiationContext.setAuthenticated(true);
@@ -334,9 +346,12 @@
{
identity = createIdentity(gssContext.getSrcName().toString());
- log.debug("context.getCredDelegState() = " + gssContext.getCredDelegState());
- log.debug("context.getMutualAuthState() = " + gssContext.getMutualAuthState());
- log.debug("context.getSrcName() = " + gssContext.getSrcName().toString());
+ if (log.isDebugEnabled())
+ {
+ log.debug("context.getCredDelegState() = " + gssContext.getCredDelegState());
+ log.debug("context.getMutualAuthState() = " + gssContext.getMutualAuthState());
+ log.debug("context.getSrcName() = " + gssContext.getSrcName().toString());
+ }
// TODO - Get these two in synch - maybe isAuthenticated based on an authentication method been set?
negotiationContext.setAuthenticationMethod(SPNEGO);
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-spnego/src/tests/java/org/jboss/security/negotiation/spnego/encoding/Security439TestCase.java
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-spnego/src/tests/java/org/jboss/security/negotiation/spnego/encoding/Security439TestCase.java 2010-10-27 17:57:33 UTC (rev 108938)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-spnego/src/tests/java/org/jboss/security/negotiation/spnego/encoding/Security439TestCase.java 2010-10-27 18:00:48 UTC (rev 108939)
@@ -7,7 +7,7 @@
import org.jboss.security.negotiation.MessageFactory;
import org.jboss.security.negotiation.NegotiationMessage;
import org.jboss.security.negotiation.common.DebugHelper;
-import org.jboss.util.Base64;
+import org.picketbox.commons.cipher.Base64;
public class Security439TestCase extends TestCase
{
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/src/main/java/org/jboss/security/negotiation/toolkit/BasicNegotiationServlet.java
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/src/main/java/org/jboss/security/negotiation/toolkit/BasicNegotiationServlet.java 2010-10-27 17:57:33 UTC (rev 108938)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/src/main/java/org/jboss/security/negotiation/toolkit/BasicNegotiationServlet.java 2010-10-27 18:00:48 UTC (rev 108939)
@@ -43,7 +43,7 @@
import org.jboss.security.negotiation.ntlm.encoding.NegotiateMessage;
import org.jboss.security.negotiation.spnego.encoding.NegTokenInit;
import org.jboss.security.negotiation.spnego.encoding.NegTokenTarg;
-import org.jboss.util.Base64;
+import org.picketbox.commons.cipher.Base64;
/**
* A basic servlet to test that if prompted the client browser will return a SPNEGO
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/src/main/java/org/jboss/security/negotiation/toolkit/NTLMNegotiationServlet.java
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/src/main/java/org/jboss/security/negotiation/toolkit/NTLMNegotiationServlet.java 2010-10-27 17:57:33 UTC (rev 108938)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/src/main/java/org/jboss/security/negotiation/toolkit/NTLMNegotiationServlet.java 2010-10-27 18:00:48 UTC (rev 108939)
@@ -37,7 +37,7 @@
import org.jboss.security.negotiation.NegotiationMessage;
import org.jboss.security.negotiation.ntlm.encoding.NTLMField;
import org.jboss.security.negotiation.ntlm.encoding.NegotiateMessage;
-import org.jboss.util.Base64;
+import org.picketbox.commons.cipher.Base64;
/**
* A basic servlet to specifically test the NTLM negotiation.
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/src/main/java/org/jboss/security/negotiation/toolkit/SecurityDomainTestServlet.java
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/src/main/java/org/jboss/security/negotiation/toolkit/SecurityDomainTestServlet.java 2010-10-27 17:57:33 UTC (rev 108938)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/src/main/java/org/jboss/security/negotiation/toolkit/SecurityDomainTestServlet.java 2010-10-27 18:00:48 UTC (rev 108939)
@@ -103,7 +103,8 @@
try
{
LoginContext context = new LoginContext(securityDomain);
- log.debug("Obtained LoginContext for '" + securityDomain + "' security-domain.");
+ if (log.isDebugEnabled())
+ log.debug("Obtained LoginContext for '" + securityDomain + "' security-domain.");
context.login();
writer.println("<h4>Authenticated</h4>");
@@ -124,7 +125,8 @@
writer.println("</code>");
context.logout();
- log.debug("logged out.");
+ if (log.isDebugEnabled())
+ log.debug("logged out.");
}
catch (Exception e)
{
More information about the jboss-cvs-commits
mailing list