Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(34)

Issue 1711046: SLING-1564 - adding support for optionally including the login form instead of redirecting to it

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 9 months ago by justinedelson
Modified:
15 years, 9 months ago
Reviewers:
fmeschbe
Visibility:
Public.

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -29 lines) Patch
bundles/extensions/formauth/pom.xml View 1 chunk +6 lines, -0 lines 0 comments Download
M bundles/extensions/formauth/src/main/java/org/apache/sling/formauth/impl/AuthenticationFormServlet.java View 5 chunks +60 lines, -19 lines 1 comment Download
M bundles/extensions/formauth/src/main/java/org/apache/sling/formauth/impl/FormAuthenticationHandler.java View 10 chunks +75 lines, -4 lines 2 comments Download
M bundles/extensions/formauth/src/main/resources/OSGI-INF/metatype/metatype.properties View 3 chunks +10 lines, -6 lines 0 comments Download

Messages

Total messages: 1
fmeschbe
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
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b