joerg 2004/01/27 03:42:51
Modified:
src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components
PipelineAuthenticator.java
Log:
SourceUtil.toDOM() is not really needed in logout, is it?
some formatting
Revision Changes Path
1.11 +16 -16
cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components/PipelineAuthenticator.java
Index: PipelineAuthenticator.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components/PipelineAuthenticator.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- PipelineAuthenticator.java 27 Jan 2004 08:26:25 -0000 1.10
+++ PipelineAuthenticator.java 27 Jan 2004 11:42:51 -0000 1.11
@@ -100,7 +100,8 @@
throws ProcessingException {
// calling method is synced
if (this.getLogger().isDebugEnabled() ) {
- this.getLogger().debug("BEGIN isValidAuthenticationFragment
fragment=" + XMLUtils.serializeNodeToXML(authenticationFragment));
+ this.getLogger().debug("BEGIN isValidAuthenticationFragment
fragment="
+ +
XMLUtils.serializeNodeToXML(authenticationFragment));
}
boolean isValid = false;
@@ -145,7 +146,7 @@
}
}
if (this.getLogger().isDebugEnabled()) {
- this.getLogger().debug("END isValidAuthenticationFragment
valid="+isValid);
+ this.getLogger().debug("END isValidAuthenticationFragment
valid=" + isValid);
}
return isValid;
}
@@ -153,14 +154,14 @@
/* (non-Javadoc)
* @see
org.apache.cocoon.webapps.authentication.components.Authenticator#authenticate(org.apache.cocoon.webapps.authentication.configuration.HandlerConfiguration,
org.apache.excalibur.source.SourceParameters)
*/
- public AuthenticationResult authenticate( HandlerConfiguration
configuration,
- SourceParameters
parameters)
+ public AuthenticationResult authenticate(HandlerConfiguration
configuration,
+ SourceParameters parameters)
throws ProcessingException {
if (this.getLogger().isDebugEnabled() ) {
this.getLogger().debug("start authenticator using handler " +
configuration.getName());
}
- final String authenticationResourceName =
configuration.getAuthenticationResource();
+ final String authenticationResourceName =
configuration.getAuthenticationResource();
final SourceParameters authenticationParameters =
configuration.getAuthenticationResourceParameters();
if (parameters != null) {
parameters.add(authenticationParameters);
@@ -175,11 +176,8 @@
try {
Source source = null;
try {
- source = SourceUtil.getSource(authenticationResourceName,
-
null,
-
parameters,
-
this.resolver);
-
+ source = SourceUtil.getSource(authenticationResourceName,
null,
+ parameters, this.resolver);
doc = SourceUtil.toDOM(source);
} catch (SAXException se) {
throw new ProcessingException(se);
@@ -190,7 +188,6 @@
} finally {
this.resolver.release(source);
}
-
} catch (ProcessingException local) {
this.getLogger().error("authenticator: " + local.getMessage(),
local);
exceptionMsg = local.getMessage();
@@ -204,7 +201,8 @@
if ( isValid ) {
if (this.getLogger().isInfoEnabled() ) {
- this.getLogger().info("Authenticator: User authenticated
using handler '" + configuration.getName()+"'");
+ this.getLogger().info("Authenticator: User authenticated
using handler '"
+ + configuration.getName() + "'");
}
MediaManager mediaManager = null;
@@ -244,13 +242,16 @@
if ( !isValid ) {
if (this.getLogger().isInfoEnabled() ) {
- this.getLogger().info("Authenticator: Failed authentication
using handler '" + configuration.getName()+"'");
+ this.getLogger().info("Authenticator: Failed authentication
using handler '"
+ + configuration.getName()+ "'");
}
// get the /authentication/data Node if available
Node data = null;
if (doc != null) {
- data = DOMUtil.getFirstNodeFromPath(doc, new String[]
{"authentication","data"}, false);
+ data = DOMUtil.getFirstNodeFromPath(doc,
+ new String[]
{"authentication","data"},
+ false);
}
doc = DOMUtil.createDocument();
@@ -329,7 +330,6 @@
// This allows arbitrary business logic to be called.
Whatever is returned
// is ignored.
source = SourceUtil.getSource(logoutResourceName, null,
parameters, this.resolver);
- Document doc = SourceUtil.toDOM(source);
} catch (Exception ignore) {
this.getLogger().error("logout: " + ignore.getMessage(),
ignore);
} finally {