incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1205458 - in /sling/trunk/bundles/auth: form/src/main/java/org/apache/sling/auth/form/impl/ openid/src/main/java/org/apache/sling/auth/openid/impl/ selector/src/main/java/org/apache/sling/auth/selector/
Date Wed, 23 Nov 2011 15:45:21 GMT
Author: fmeschbe
Date: Wed Nov 23 15:45:20 2011
New Revision: 1205458

URL: http://svn.apache.org/viewvc?rev=1205458&view=rev
Log:
SLING-2299 The checkReferer method has actually been moved to AuthUtil because it was not
contained in a released version of Auth Core bundle yet.

Modified:
    sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl/FormAuthenticationHandler.java
    sling/trunk/bundles/auth/openid/src/main/java/org/apache/sling/auth/openid/impl/OpenIDAuthenticationHandler.java
    sling/trunk/bundles/auth/selector/src/main/java/org/apache/sling/auth/selector/SelectorAuthenticationHandler.java

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=1205458&r1=1205457&r2=1205458&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
Wed Nov 23 15:45:20 2011
@@ -49,6 +49,7 @@ import org.apache.sling.api.resource.Log
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.api.resource.ResourceResolverFactory;
+import org.apache.sling.auth.core.AuthUtil;
 import org.apache.sling.auth.core.spi.AbstractAuthenticationHandler;
 import org.apache.sling.auth.core.spi.AuthenticationHandler;
 import org.apache.sling.auth.core.spi.AuthenticationInfo;
@@ -354,11 +355,11 @@ public class FormAuthenticationHandler e
         }
 
         //check the referer to see if the request is for this handler
-        if (!checkReferer(request, loginForm)) {
+        if (!AuthUtil.checkReferer(request, loginForm)) {
         	//not for this handler, so return
         	return false;
         }
-        
+
         final String resource = setLoginResourceAttribute(request,
             request.getRequestURI());
 

Modified: sling/trunk/bundles/auth/openid/src/main/java/org/apache/sling/auth/openid/impl/OpenIDAuthenticationHandler.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/auth/openid/src/main/java/org/apache/sling/auth/openid/impl/OpenIDAuthenticationHandler.java?rev=1205458&r1=1205457&r2=1205458&view=diff
==============================================================================
--- sling/trunk/bundles/auth/openid/src/main/java/org/apache/sling/auth/openid/impl/OpenIDAuthenticationHandler.java
(original)
+++ sling/trunk/bundles/auth/openid/src/main/java/org/apache/sling/auth/openid/impl/OpenIDAuthenticationHandler.java
Wed Nov 23 15:45:20 2011
@@ -36,6 +36,7 @@ import org.apache.jackrabbit.api.Jackrab
 import org.apache.jackrabbit.api.security.user.User;
 import org.apache.jackrabbit.api.security.user.UserManager;
 import org.apache.sling.api.auth.Authenticator;
+import org.apache.sling.auth.core.AuthUtil;
 import org.apache.sling.auth.core.spi.AbstractAuthenticationHandler;
 import org.apache.sling.auth.core.spi.AuthenticationInfo;
 import org.apache.sling.auth.core.spi.DefaultAuthenticationFeedbackHandler;
@@ -396,11 +397,11 @@ public class OpenIDAuthenticationHandler
         }
 
         //check the referer to see if the request is for this handler
-        if (!checkReferer(request, loginForm)) {
+        if (!AuthUtil.checkReferer(request, loginForm)) {
         	//not for this handler, so return
         	return false;
         }
-        
+
 
         // requestAuthentication is only called after a failedauthentication
         // so it makes sense to remove any existing login

Modified: sling/trunk/bundles/auth/selector/src/main/java/org/apache/sling/auth/selector/SelectorAuthenticationHandler.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/auth/selector/src/main/java/org/apache/sling/auth/selector/SelectorAuthenticationHandler.java?rev=1205458&r1=1205457&r2=1205458&view=diff
==============================================================================
--- sling/trunk/bundles/auth/selector/src/main/java/org/apache/sling/auth/selector/SelectorAuthenticationHandler.java
(original)
+++ sling/trunk/bundles/auth/selector/src/main/java/org/apache/sling/auth/selector/SelectorAuthenticationHandler.java
Wed Nov 23 15:45:20 2011
@@ -32,6 +32,7 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.api.auth.Authenticator;
+import org.apache.sling.auth.core.AuthUtil;
 import org.apache.sling.auth.core.spi.AbstractAuthenticationHandler;
 import org.apache.sling.auth.core.spi.AuthenticationInfo;
 import org.apache.sling.commons.osgi.OsgiUtil;
@@ -88,11 +89,11 @@ public class SelectorAuthenticationHandl
             HttpServletResponse response) {
 
         //check the referer to see if the request is for this handler
-        if (!checkReferer(request, loginForm)) {
+        if (!AuthUtil.checkReferer(request, loginForm)) {
         	//not for this handler, so return
         	return false;
         }
-    	
+
         HashMap<String, String> params = new HashMap<String, String>();
         params.put(Authenticator.LOGIN_RESOURCE,
             getLoginResource(request, null));



Mime
View raw message