[Yanel-commits] rev 42983 -
public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/security/impl
michi at wyona.com
michi at wyona.com
Thu May 21 22:33:09 CEST 2009
Author: michi
Date: 2009-05-21 22:33:09 +0200 (Thu, 21 May 2009)
New Revision: 42983
Modified:
public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/security/impl/DefaultWebAuthenticatorImpl.java
Log:
StringBuffer by StringBuilder replaced and TODO re neutron added
Modified: public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/security/impl/DefaultWebAuthenticatorImpl.java
===================================================================
--- public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/security/impl/DefaultWebAuthenticatorImpl.java 2009-05-21 20:25:07 UTC (rev 42982)
+++ public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/security/impl/DefaultWebAuthenticatorImpl.java 2009-05-21 20:33:09 UTC (rev 42983)
@@ -233,7 +233,8 @@
// TODO: Refactor this code with the one from doAuthenticate ...
log.debug("Original Request: " + originalRequest);
- StringBuffer sb = new StringBuffer("");
+ // TODO: Use org.wyona.neutron.XMLExceptionV1.getAuthenticationException(...)
+ StringBuilder sb = new StringBuilder("");
sb.append("<?xml version=\"1.0\"?>");
sb.append("<exception xmlns=\"http://www.wyona.org/neutron/1.0\" type=\"authentication\">");
sb.append("<message>Authentication failed!</message>");
@@ -310,13 +311,16 @@
// Check if this is a neutron request, a Sunbird/Calendar request or just a common GET request
// Also see e-mail about recognizing a WebDAV request: http://lists.w3.org/Archives/Public/w3c-dist-auth/2006AprJun/0064.html
- StringBuffer sb = new StringBuffer("");
String neutronVersions = request.getHeader("Neutron");
String clientSupportedAuthScheme = request.getHeader("WWW-Authenticate");
if (clientSupportedAuthScheme != null && clientSupportedAuthScheme.equals("Neutron-Auth")) {
log.debug("Neutron Versions supported by client: " + neutronVersions);
log.debug("Authentication Scheme supported by client: " + clientSupportedAuthScheme);
+
+
+ // TODO: Use org.wyona.neutron.XMLExceptionV1.getAuthorizationException(...)
+ StringBuilder sb = new StringBuilder("");
sb.append("<?xml version=\"1.0\"?>");
sb.append("<exception xmlns=\"http://www.wyona.org/neutron/1.0\" type=\"authorization\">");
sb.append("<message>Authorization denied: " + getRequestURLQS(request, null, true, map) + "</message>");
More information about the Yanel-commits
mailing list