http://codereview.appspot.com/1711046/diff/1/3 File bundles/extensions/formauth/src/main/java/org/apache/sling/formauth/impl/AuthenticationFormServlet.java (right): http://codereview.appspot.com/1711046/diff/1/3#newcode203 bundles/extensions/formauth/src/main/java/org/apache/sling/formauth/impl/AuthenticationFormServlet.java:203: Enumeration<URL> resources = getClass().getClassLoader().getResources("/org/apache/sling/formauth/impl/login.html"); We might define two paths: ...
15 years, 9 months ago
(2010-06-23 08:31:49 UTC)
#1
http://codereview.appspot.com/1711046/diff/1/3
File
bundles/extensions/formauth/src/main/java/org/apache/sling/formauth/impl/AuthenticationFormServlet.java
(right):
http://codereview.appspot.com/1711046/diff/1/3#newcode203
bundles/extensions/formauth/src/main/java/org/apache/sling/formauth/impl/AuthenticationFormServlet.java:203:
Enumeration<URL> resources =
getClass().getClassLoader().getResources("/org/apache/sling/formauth/impl/login.html");
We might define two paths:
* CUSTOM_PATH = "...";
* DEFAULT_PATH = "...";
and then:
URL url = getClass().getResource(CUSTOM_PATH);
if (url == null) {
url = getClass().getResource(DEFAULT_PATH);
}
the file at DEFAULT_PATH is provided by the Form Auth Bundle while the resource
at CUSTOM_PATH could be provided by a fragment -- or (theoretically) even
through the Resource Resolver ...
http://codereview.appspot.com/1711046/diff/1/4
File
bundles/extensions/formauth/src/main/java/org/apache/sling/formauth/impl/FormAuthenticationHandler.java
(right):
http://codereview.appspot.com/1711046/diff/1/4#newcode281
bundles/extensions/formauth/src/main/java/org/apache/sling/formauth/impl/FormAuthenticationHandler.java:281:
private ResourceResolverFactory resourceResolverFactory;
You might tag the reference here like this:
/** @scr.reference policy="dynamic" cardinality="0..1" */
private ResourceResolverFactory resourceResolverFactory;
This clearly marks this field as being injected
http://codereview.appspot.com/1711046/diff/1/4#newcode787
bundles/extensions/formauth/src/main/java/org/apache/sling/formauth/impl/FormAuthenticationHandler.java:787:
this.resourceResolverFactory = null;
The bind and unbind methods are not strictly required because they are generated
automatically by the SCR plugin
Issue 1711046: SLING-1564 - adding support for optionally including the login form instead of redirecting to it
Created 15 years, 9 months ago by justinedelson
Modified 15 years, 9 months ago
Reviewers: fmeschbe
Base URL:
Comments: 3