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 2010/01/08 11:16:41 UTC
svn commit: r897156 - in
/sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth:
impl/ impl/engine/ spi/
Author: fmeschbe
Date: Fri Jan 8 10:16:38 2010
New Revision: 897156
URL: http://svn.apache.org/viewvc?rev=897156&view=rev
Log:
SLING-1280 Rename methods of the (new) AuthenticationHandler interface to better reflect their tasks
Modified:
sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/AbstractAuthenticationHandlerHolder.java
sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/AuthenticationHandlerHolder.java
sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/SlingAuthenticator.java
sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/engine/EngineAuthenticationHandlerHolder.java
sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/spi/AuthenticationHandler.java
Modified: sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/AbstractAuthenticationHandlerHolder.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/AbstractAuthenticationHandlerHolder.java?rev=897156&r1=897155&r2=897156&view=diff
==============================================================================
--- sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/AbstractAuthenticationHandlerHolder.java (original)
+++ sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/AbstractAuthenticationHandlerHolder.java Fri Jan 8 10:16:38 2010
@@ -39,40 +39,40 @@
super(fullPath);
}
- protected abstract AuthenticationInfo doAuthenticate(HttpServletRequest request,
+ protected abstract AuthenticationInfo doExtractCredentials(HttpServletRequest request,
HttpServletResponse response);
- public final AuthenticationInfo authenticate(HttpServletRequest request,
+ public final AuthenticationInfo extractCredentials(HttpServletRequest request,
HttpServletResponse response) {
final Object oldPathAttr = setPath(request);
try {
- return doAuthenticate(request, response);
+ return doExtractCredentials(request, response);
} finally {
resetPath(request, oldPathAttr);
}
}
- protected abstract boolean doRequestAuthentication(HttpServletRequest request,
+ protected abstract boolean doRequestCredentials(HttpServletRequest request,
HttpServletResponse response) throws IOException;
- public final boolean requestAuthentication(HttpServletRequest request,
+ public final boolean requestCredentials(HttpServletRequest request,
HttpServletResponse response) throws IOException {
final Object oldPathAttr = setPath(request);
try {
- return doRequestAuthentication(request, response);
+ return doRequestCredentials(request, response);
} finally {
resetPath(request, oldPathAttr);
}
}
- protected abstract void doDropAuthentication(HttpServletRequest request,
+ protected abstract void doDropCredentials(HttpServletRequest request,
HttpServletResponse response) throws IOException;
- public final void dropAuthentication(HttpServletRequest request,
+ public final void dropCredentials(HttpServletRequest request,
HttpServletResponse response) throws IOException {
- doDropAuthentication(request, response);
+ doDropCredentials(request, response);
}
private Object setPath(final HttpServletRequest request) {
Modified: sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/AuthenticationHandlerHolder.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/AuthenticationHandlerHolder.java?rev=897156&r1=897155&r2=897156&view=diff
==============================================================================
--- sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/AuthenticationHandlerHolder.java (original)
+++ sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/AuthenticationHandlerHolder.java Fri Jan 8 10:16:38 2010
@@ -47,21 +47,21 @@
this.handler = handler;
}
- public AuthenticationInfo doAuthenticate(HttpServletRequest request,
+ public AuthenticationInfo doExtractCredentials(HttpServletRequest request,
HttpServletResponse response) {
- return handler.authenticate(request, response);
+ return handler.extractCredentials(request, response);
}
- public boolean doRequestAuthentication(HttpServletRequest request,
+ public boolean doRequestCredentials(HttpServletRequest request,
HttpServletResponse response) throws IOException {
- return handler.requestAuthentication(request, response);
+ return handler.requestCredentials(request, response);
}
- public void doDropAuthentication(HttpServletRequest request,
+ public void doDropCredentials(HttpServletRequest request,
HttpServletResponse response) throws IOException {
- handler.dropAuthentication(request, response);
+ handler.dropCredentials(request, response);
}
@Override
Modified: sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/SlingAuthenticator.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/SlingAuthenticator.java?rev=897156&r1=897155&r2=897156&view=diff
==============================================================================
--- sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/SlingAuthenticator.java (original)
+++ sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/SlingAuthenticator.java Fri Jan 8 10:16:38 2010
@@ -355,7 +355,7 @@
holder);
try {
- done = holder.requestAuthentication(request, response);
+ done = holder.requestCredentials(request, response);
} catch (IOException ioe) {
log.error(
"login: Failed sending authentication request through handler "
@@ -395,7 +395,7 @@
holder);
try {
- holder.dropAuthentication(request, response);
+ holder.dropCredentials(request, response);
} catch (IOException ioe) {
log.error(
"logout: Failed dropping authentication through handler "
@@ -523,7 +523,7 @@
for (int i = 0; i < local.size(); i++) {
AbstractAuthenticationHandlerHolder holder = local.get(i);
if (pathInfo.startsWith(holder.path)) {
- final AuthenticationInfo authInfo = holder.authenticate(
+ final AuthenticationInfo authInfo = holder.extractCredentials(
request, response);
if (authInfo != null) {
return authInfo;
Modified: sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/engine/EngineAuthenticationHandlerHolder.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/engine/EngineAuthenticationHandlerHolder.java?rev=897156&r1=897155&r2=897156&view=diff
==============================================================================
--- sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/engine/EngineAuthenticationHandlerHolder.java (original)
+++ sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/engine/EngineAuthenticationHandlerHolder.java Fri Jan 8 10:16:38 2010
@@ -46,7 +46,7 @@
this.handler = handler;
}
- public AuthenticationInfo doAuthenticate(HttpServletRequest request,
+ public AuthenticationInfo doExtractCredentials(HttpServletRequest request,
HttpServletResponse response) {
org.apache.sling.engine.auth.AuthenticationInfo engineAuthInfo = handler.authenticate(
@@ -65,12 +65,12 @@
return info;
}
- public boolean doRequestAuthentication(HttpServletRequest request,
+ public boolean doRequestCredentials(HttpServletRequest request,
HttpServletResponse response) throws IOException {
return handler.requestAuthentication(request, response);
}
- public void doDropAuthentication(HttpServletRequest request,
+ public void doDropCredentials(HttpServletRequest request,
HttpServletResponse response) {
// Engine AuthenticationHandler does not have this method
}
Modified: sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/spi/AuthenticationHandler.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/spi/AuthenticationHandler.java?rev=897156&r1=897155&r2=897156&view=diff
==============================================================================
--- sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/spi/AuthenticationHandler.java (original)
+++ sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/spi/AuthenticationHandler.java Fri Jan 8 10:16:38 2010
@@ -97,7 +97,7 @@
* In case of {@link AuthenticationInfo#DOING_AUTH}, the method must
* have sent a response indicating that fact to the client.
*/
- AuthenticationInfo authenticate(HttpServletRequest request,
+ AuthenticationInfo extractCredentials(HttpServletRequest request,
HttpServletResponse response);
/**
@@ -126,7 +126,7 @@
* @throws IOException If an error occurrs sending the authentication
* inquiry to the client.
*/
- boolean requestAuthentication(HttpServletRequest request,
+ boolean requestCredentials(HttpServletRequest request,
HttpServletResponse response) throws IOException;
/**
@@ -138,6 +138,6 @@
* @throws IOException If an error occurrs asking the client to drop any
* authentication traces.
*/
- void dropAuthentication(HttpServletRequest request,
+ void dropCredentials(HttpServletRequest request,
HttpServletResponse response) throws IOException;
}