Commit 4a685d18 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Commented out debugging information.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9887 b35dd754-fafc-0310-a699-88a17e54d16e
parent b3406dfd
...@@ -53,14 +53,14 @@ public class XMPPCallbackHandler implements CallbackHandler { ...@@ -53,14 +53,14 @@ public class XMPPCallbackHandler implements CallbackHandler {
if (realm == null) { if (realm == null) {
realm = ((RealmCallback) callback).getDefaultText(); realm = ((RealmCallback) callback).getDefaultText();
} }
Log.debug("XMPPCallbackHandler: RealmCallback: " + realm); //Log.debug("XMPPCallbackHandler: RealmCallback: " + realm);
} }
else if (callback instanceof NameCallback) { else if (callback instanceof NameCallback) {
name = ((NameCallback) callback).getName(); name = ((NameCallback) callback).getName();
if (name == null) { if (name == null) {
name = ((NameCallback) callback).getDefaultName(); name = ((NameCallback) callback).getDefaultName();
} }
Log.debug("XMPPCallbackHandler: NameCallback: " + name); //Log.debug("XMPPCallbackHandler: NameCallback: " + name);
} }
else if (callback instanceof PasswordCallback) { else if (callback instanceof PasswordCallback) {
try { try {
...@@ -69,7 +69,7 @@ public class XMPPCallbackHandler implements CallbackHandler { ...@@ -69,7 +69,7 @@ public class XMPPCallbackHandler implements CallbackHandler {
((PasswordCallback) callback) ((PasswordCallback) callback)
.setPassword(AuthFactory.getPassword(name).toCharArray()); .setPassword(AuthFactory.getPassword(name).toCharArray());
Log.debug("XMPPCallbackHandler: PasswordCallback"); //Log.debug("XMPPCallbackHandler: PasswordCallback");
} }
catch (UserNotFoundException e) { catch (UserNotFoundException e) {
throw new IOException(e.toString()); throw new IOException(e.toString());
...@@ -80,7 +80,7 @@ public class XMPPCallbackHandler implements CallbackHandler { ...@@ -80,7 +80,7 @@ public class XMPPCallbackHandler implements CallbackHandler {
} }
else if (callback instanceof VerifyPasswordCallback) { else if (callback instanceof VerifyPasswordCallback) {
Log.debug("XMPPCallbackHandler: VerifyPasswordCallback"); //Log.debug("XMPPCallbackHandler: VerifyPasswordCallback");
VerifyPasswordCallback vpcb = (VerifyPasswordCallback) callback; VerifyPasswordCallback vpcb = (VerifyPasswordCallback) callback;
try { try {
AuthToken at = AuthFactory.authenticate(name, new String(vpcb.getPassword())); AuthToken at = AuthFactory.authenticate(name, new String(vpcb.getPassword()));
...@@ -91,7 +91,7 @@ public class XMPPCallbackHandler implements CallbackHandler { ...@@ -91,7 +91,7 @@ public class XMPPCallbackHandler implements CallbackHandler {
} }
} }
else if (callback instanceof AuthorizeCallback) { else if (callback instanceof AuthorizeCallback) {
Log.debug("XMPPCallbackHandler: AuthorizeCallback"); //Log.debug("XMPPCallbackHandler: AuthorizeCallback");
AuthorizeCallback authCallback = ((AuthorizeCallback) callback); AuthorizeCallback authCallback = ((AuthorizeCallback) callback);
// Principal that authenticated // Principal that authenticated
String principal = authCallback.getAuthenticationID(); String principal = authCallback.getAuthenticationID();
...@@ -106,26 +106,26 @@ public class XMPPCallbackHandler implements CallbackHandler { ...@@ -106,26 +106,26 @@ public class XMPPCallbackHandler implements CallbackHandler {
//client perhaps made no request, get default username //client perhaps made no request, get default username
username = AuthorizationManager.map(principal); username = AuthorizationManager.map(principal);
if (Log.isDebugEnabled()) { if (Log.isDebugEnabled()) {
Log.debug("XMPPCallbackHandler: no username requested, using " + username); //Log.debug("XMPPCallbackHandler: no username requested, using " + username);
} }
} }
if (AuthorizationManager.authorize(username, principal)) { if (AuthorizationManager.authorize(username, principal)) {
if (Log.isDebugEnabled()) { if (Log.isDebugEnabled()) {
Log.debug("XMPPCallbackHandler: " + principal + " authorized to " + username); //Log.debug("XMPPCallbackHandler: " + principal + " authorized to " + username);
} }
authCallback.setAuthorized(true); authCallback.setAuthorized(true);
authCallback.setAuthorizedID(username); authCallback.setAuthorizedID(username);
} }
else { else {
if (Log.isDebugEnabled()) { if (Log.isDebugEnabled()) {
Log.debug("XMPPCallbackHandler: " + principal + " not authorized to " + username); //Log.debug("XMPPCallbackHandler: " + principal + " not authorized to " + username);
} }
authCallback.setAuthorized(false); authCallback.setAuthorized(false);
} }
} }
else { else {
if (Log.isDebugEnabled()) { if (Log.isDebugEnabled()) {
Log.debug("XMPPCallbackHandler: Callback: " + callback.getClass().getSimpleName()); //Log.debug("XMPPCallbackHandler: Callback: " + callback.getClass().getSimpleName());
} }
throw new UnsupportedCallbackException(callback, "Unrecognized Callback"); throw new UnsupportedCallbackException(callback, "Unrecognized Callback");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment