You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by fm...@apache.org on 2011/11/07 16:12:49 UTC

svn commit: r1198771 - in /sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl: AuthenticationFormServlet.java FormAuthenticationHandler.java TokenStore.java

Author: fmeschbe
Date: Mon Nov  7 15:12:49 2011
New Revision: 1198771

URL: http://svn.apache.org/viewvc?rev=1198771&view=rev
Log:
SLING-2080 Apply patch by Angela Schreiber (thank you very much)

Modified:
    sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl/AuthenticationFormServlet.java
    sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl/FormAuthenticationHandler.java
    sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl/TokenStore.java

Modified: sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl/AuthenticationFormServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl/AuthenticationFormServlet.java?rev=1198771&r1=1198770&r2=1198771&view=diff
==============================================================================
--- sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl/AuthenticationFormServlet.java (original)
+++ sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl/AuthenticationFormServlet.java Mon Nov  7 15:12:49 2011
@@ -64,6 +64,7 @@ public class AuthenticationFormServlet e
      * @return The "translated" reason to render the login form or an empty
      *         string if there is no specific reason
      */
+    @Override
     protected String getReason(final HttpServletRequest request) {
         // return the resource attribute if set to a non-empty string
         Object resObj = request.getAttribute(AuthenticationHandler.FAILURE_REASON);

Modified: sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl/FormAuthenticationHandler.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl/FormAuthenticationHandler.java?rev=1198771&r1=1198770&r2=1198771&view=diff
==============================================================================
--- sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl/FormAuthenticationHandler.java (original)
+++ sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl/FormAuthenticationHandler.java Mon Nov  7 15:12:49 2011
@@ -211,7 +211,7 @@ public class FormAuthenticationHandler e
      * <p>
      * This name is derived from the prescription in the Servlet API 2.4
      * Specification, Section SRV.12.5.3.1 Login Form Notes: <i>In order for the
-     * authentication to proceeed appropriately, the action of the login form
+     * authentication to proceed appropriately, the action of the login form
      * must always be set to <code>j_security_check</code>.</i>
      */
     private static final String REQUEST_URL_SUFFIX = "/j_security_check";
@@ -417,6 +417,7 @@ public class FormAuthenticationHandler e
      * sure the authentication data is removed either by removing the cookie or
      * by remove the HTTP Session attribute.
      */
+    @Override
     public void authenticationFailed(HttpServletRequest request,
             HttpServletResponse response, AuthenticationInfo authInfo) {
 
@@ -433,7 +434,7 @@ public class FormAuthenticationHandler e
     }
 
     /**
-     * Called after successfull login with the given authentication info. This
+     * Called after successful login with the given authentication info. This
      * implementation ensures the authentication data is set in either the
      * cookie or the HTTP session with the correct security tokens.
      * <p>
@@ -445,12 +446,13 @@ public class FormAuthenticationHandler e
      * removed from the cookie or the HTTP session and future requests will not
      * be authenticated any longer.
      */
+    @Override
     public boolean authenticationSucceeded(HttpServletRequest request,
             HttpServletResponse response, AuthenticationInfo authInfo) {
 
         /*
          * Note: This method is called if this handler provided credentials
-         * which succeeded loging into the repository
+         * which succeeded login into the repository
          */
 
         // ensure fresh authentication data
@@ -519,9 +521,9 @@ public class FormAuthenticationHandler e
      * <p>
      * This method is intended to be called in case authentication succeeded.
      *
-     * @param request The curent request
+     * @param request The current request
      * @param response The current response
-     * @param authInfo The authentication info used to successfull log in
+     * @param authInfo The authentication info used to successful log in
      */
     private void refreshAuthData(final HttpServletRequest request,
             final HttpServletResponse response,

Modified: sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl/TokenStore.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl/TokenStore.java?rev=1198771&r1=1198770&r2=1198771&view=diff
==============================================================================
--- sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl/TokenStore.java (original)
+++ sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl/TokenStore.java Mon Nov  7 15:12:49 2011
@@ -86,7 +86,7 @@ class TokenStore {
     private volatile int currentToken = 0;
 
     /**
-     * A ring of tokens used to encypt.
+     * A ring of tokens used to encrypt.
      */
     private volatile SecretKey[] currentTokens;
 
@@ -416,7 +416,7 @@ class TokenStore {
      * <code>java.io.tmpdir</code> folder.</li>
      * </ul>
      * <p>
-     * <b>NOTE</b> This method generates entropy fast but not necessairily
+     * <b>NOTE</b> This method generates entropy fast but not necessarily
      * secure enough for seeding the random number generator.
      *
      * @return bytes of entropy