Commit 7c2385f6 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Throw SASL exception if authentication failed

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@10575 b35dd754-fafc-0310-a699-88a17e54d16e
parent 8dd85b18
...@@ -75,8 +75,13 @@ public class ClearspaceSaslServer implements SaslServer { ...@@ -75,8 +75,13 @@ public class ClearspaceSaslServer implements SaslServer {
if ("true".equals(WSUtils.getReturn(resultElement))) { if ("true".equals(WSUtils.getReturn(resultElement))) {
completed = true; completed = true;
} }
else {
// Failed to authenticate the user so throw an error so SASL failure is returned
throw new SaslException("SASL CLEARSPACE: user not authorized: " + jid);
}
} catch (Exception e) { } catch (Exception e) {
Log.error("Failed communicating with Clearspace" , e); Log.error("Failed communicating with Clearspace" , e);
throw new SaslException("SASL CLEARSPACE: user not authorized due to an error: " + jid);
} }
return null; return null;
......
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