Remove logout method from Authn handler
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 4 Sep 2007 16:52:23 +0000 (16:52 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 4 Sep 2007 16:52:23 +0000 (16:52 +0000)
Rename Authn handlers to Login handlers

git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2368 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

21 files changed:
resources/WEB-INF/web.xml
resources/classpath/schema/shibboleth-2.0-idp-profile-handler.xsd
resources/conf/handler.xml
src/edu/internet2/middleware/shibboleth/idp/authn/AuthenticationEngine.java
src/edu/internet2/middleware/shibboleth/idp/authn/LoginContext.java
src/edu/internet2/middleware/shibboleth/idp/authn/LoginHandler.java [moved from src/edu/internet2/middleware/shibboleth/idp/authn/AuthenticationHandler.java with 87% similarity]
src/edu/internet2/middleware/shibboleth/idp/authn/provider/AbstractLoginHandler.java [moved from src/edu/internet2/middleware/shibboleth/idp/authn/provider/AbstractAuthenticationHandler.java with 85% similarity]
src/edu/internet2/middleware/shibboleth/idp/authn/provider/IPAddressLoginHandler.java [moved from src/edu/internet2/middleware/shibboleth/idp/authn/provider/IPAddressAuthenticationHandler.java with 94% similarity]
src/edu/internet2/middleware/shibboleth/idp/authn/provider/RemoteUserAuthServlet.java
src/edu/internet2/middleware/shibboleth/idp/authn/provider/RemoteUserLoginHandler.java [moved from src/edu/internet2/middleware/shibboleth/idp/authn/provider/RemoteUserAuthenticationHandler.java with 93% similarity]
src/edu/internet2/middleware/shibboleth/idp/authn/provider/UsernamePasswordLoginHandler.java [moved from src/edu/internet2/middleware/shibboleth/idp/authn/provider/UsernamePasswordAuthenticationHandler.java with 94% similarity]
src/edu/internet2/middleware/shibboleth/idp/authn/provider/UsernamePasswordLoginServlet.java [moved from src/edu/internet2/middleware/shibboleth/idp/authn/provider/UsernamePasswordAuthenticationServlet.java with 95% similarity]
src/edu/internet2/middleware/shibboleth/idp/config/profile/ProfileHandlerGroup.java
src/edu/internet2/middleware/shibboleth/idp/config/profile/ProfileHandlerNamespaceHandler.java
src/edu/internet2/middleware/shibboleth/idp/config/profile/authn/AbstractLoginHandlerBeanDefinitionParser.java [moved from src/edu/internet2/middleware/shibboleth/idp/config/profile/authn/AbstractAuthenticationHandlerBeanDefinitionParser.java with 92% similarity]
src/edu/internet2/middleware/shibboleth/idp/config/profile/authn/AbstractLoginHandlerFactoryBean.java [moved from src/edu/internet2/middleware/shibboleth/idp/config/profile/authn/AbstractAuthenticationHandlerFactoryBean.java with 92% similarity]
src/edu/internet2/middleware/shibboleth/idp/config/profile/authn/RemoteUserLoginHandlerBeanDefinitionParser.java [moved from src/edu/internet2/middleware/shibboleth/idp/config/profile/authn/RemoteUserAuthenticationHandlerBeanDefinitionParser.java with 89% similarity]
src/edu/internet2/middleware/shibboleth/idp/config/profile/authn/RemoteUserLoginHandlerFactoryBean.java [moved from src/edu/internet2/middleware/shibboleth/idp/config/profile/authn/RemoteUserAuthenticationHandlerFactoryBean.java with 81% similarity]
src/edu/internet2/middleware/shibboleth/idp/config/profile/authn/UsernamePasswordLoginHandlerBeanDefinitionParser.java [moved from src/edu/internet2/middleware/shibboleth/idp/config/profile/authn/UsernamePasswordAuthenticationHandlerBeanDefinitionParser.java with 90% similarity]
src/edu/internet2/middleware/shibboleth/idp/config/profile/authn/UsernamePasswordLoginHandlerFactoryBean.java [moved from src/edu/internet2/middleware/shibboleth/idp/config/profile/authn/UsernamePasswordAuthenticationHandlerFactoryBean.java with 80% similarity]
src/edu/internet2/middleware/shibboleth/idp/profile/IdPProfileHandlerManager.java

index 4634de5..ccfd43d 100644 (file)
@@ -59,7 +59,7 @@
     <!-- Servlet protected by container user for RemoteUser authentication -->
     <servlet>
         <servlet-name>RemoteUserAuthHandler</servlet-name>
-        <servlet-class>edu.internet2.middleware.shibboleth.idp.authn.provider.RemoteUserAuthServlet</servlet-class>
+        <servlet-class>edu.internet2.middleware.shibboleth.idp.authn.provider.RemoteUserLoginServlet</servlet-class>
     </servlet>
 
     <servlet-mapping>
@@ -70,7 +70,7 @@
     <!-- Servlet for doing Username/Password authentication -->
     <servlet>
         <servlet-name>UsernamePasswordAuthHandler</servlet-name>
-        <servlet-class>edu.internet2.middleware.shibboleth.idp.authn.provider.UsernamePasswordAuthenticationServlet</servlet-class>
+        <servlet-class>edu.internet2.middleware.shibboleth.idp.authn.provider.UsernamePasswordLoginServlet</servlet-class>
     </servlet>
 
     <servlet-mapping>
index 190abc1..ef01ecf 100644 (file)
@@ -32,7 +32,7 @@
             <xsd:sequence>
                 <xsd:element name="ErrorHandler" type="ErrorHandlerType" />
                 <xsd:element name="ProfileHandler" type="RequestHandlerType" minOccurs="0" maxOccurs="unbounded" />
-                <xsd:element name="AuthenticationHandler" type="AuthenticationHandlerType" minOccurs="0"
+                <xsd:element name="LoginHandler" type="LoginHandlerType" minOccurs="0"
                     maxOccurs="unbounded" />
             </xsd:sequence>
         </xsd:complexType>
 
     <xsd:complexType name="RemoteUser">
         <xsd:complexContent>
-            <xsd:extension base="AuthenticationHandlerType">
+            <xsd:extension base="LoginHandlerType">
                 <xsd:attribute name="protectedServletPath" type="xsd:string" default="/Authn/RemoteUser">
                     <xsd:annotation>
                         <xsd:documentation>
 
     <xsd:complexType name="UsernamePassword">
         <xsd:complexContent>
-            <xsd:extension base="AuthenticationHandlerType">
+            <xsd:extension base="LoginHandlerType">
                 <xsd:attribute name="jaasConfigurationLocation" type="xsd:anyURI">
                     <xsd:annotation>
                         <xsd:documentation>
         </xsd:complexContent>
     </xsd:complexType>
 
-    <xsd:complexType name="AuthenticationHandlerType" abstract="true">
+    <xsd:complexType name="LoginHandlerType" abstract="true">
         <xsd:annotation>
             <xsd:documentation>Base type for authentication handler types.</xsd:documentation>
         </xsd:annotation>
index 6796a74..b8a9f20 100644 (file)
         <RequestPath>/saml2/SOAP/AttributeQuery</RequestPath>
     </ProfileHandler>
     
-    <AuthenticationHandler xsi:type="RemoteUser">
+    <LoginHandler xsi:type="RemoteUser">
         <AuthenticationMethod>urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified</AuthenticationMethod>
-    </AuthenticationHandler>
+    </LoginHandler>
     
-    <AuthenticationHandler xsi:type="UsernamePassword" 
-                           jaasConfigurationLocation="file://$IDP_HOME$/conf/login.config">
+    <LoginHandler xsi:type="UsernamePassword" 
+                  jaasConfigurationLocation="file://$IDP_HOME$/conf/login.config">
         <AuthenticationMethod>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</AuthenticationMethod>
-    </AuthenticationHandler>
+    </LoginHandler>
 
 </ProfileHandlerGroup>
\ No newline at end of file
index 53feb1f..ec5c8e5 100644 (file)
@@ -220,7 +220,7 @@ public class AuthenticationEngine extends HttpServlet {
         if (LOG.isDebugEnabled()) {
             LOG.debug("Selecting appropriate authentication method for request.");
         }
-        Pair<String, AuthenticationHandler> handler = getProfileHandlerManager().getAuthenticationHandler(loginContext);
+        Pair<String, LoginHandler> handler = getProfileHandlerManager().getAuthenticationHandler(loginContext);
 
         if (handler == null) {
             loginContext.setPrincipalAuthenticated(false);
@@ -259,7 +259,7 @@ public class AuthenticationEngine extends HttpServlet {
     protected void authenticateUserWithoutActiveMethod2(HttpServletRequest httpRequest, HttpServletResponse httpResponse) {
         HttpSession httpSession = httpRequest.getSession();
 
-        String principalName = (String) httpRequest.getAttribute(AuthenticationHandler.PRINCIPAL_NAME_KEY);
+        String principalName = (String) httpRequest.getAttribute(LoginHandler.PRINCIPAL_NAME_KEY);
         LoginContext loginContext = (LoginContext) httpSession.getAttribute(LoginContext.LOGIN_CONTEXT_KEY);
         if (DatatypeHelper.isEmpty(principalName)) {
             loginContext.setPrincipalAuthenticated(false);
@@ -296,7 +296,7 @@ public class AuthenticationEngine extends HttpServlet {
             LOG.debug("Recording authentication and service information in Shibboleth session for principal: "
                     + principalName);
         }
-        Subject subject = (Subject) httpRequest.getAttribute(AuthenticationHandler.SUBJECT_KEY);
+        Subject subject = (Subject) httpRequest.getAttribute(LoginHandler.SUBJECT_KEY);
         AuthenticationMethodInformation authnMethodInfo = new AuthenticationMethodInformationImpl(subject, loginContext
                 .getAuthenticationMethod(), new DateTime(), loginContext.getAuthenticationDuration());
 
index dc34585..47f6a69 100644 (file)
@@ -38,7 +38,7 @@ import org.joda.time.DateTime;
  * LoginContexts should be created by a profile handler when authentication is needed. Once control has returned to the
  * profile handler, it should remove the LoginContext from the HttpSession.
  * 
- * The {@link AuthenticationEngine} or an {@link AuthenticationHandler} should set the
+ * The {@link AuthenticationEngine} or an {@link LoginHandler} should set the
  * {@link LoginContext#setAuthenticationAttempted()}, {@link LoginContext#setPrincipalAuthenticated(boolean)},
  * {@link LoginContext#setAuthnFailure(String)}, {@link LoginContext#{setAuthenticationDuration(long)}
  * {@link LoginContext#setAuthenticationInstant(DateTime)} appropriately.
@@ -230,7 +230,7 @@ public class LoginContext implements Serializable {
     /**
      * Set if authentication has been attempted.
      * 
-     * This method should be called by an {@link AuthenticationHandler} while processing a request.
+     * This method should be called by an {@link LoginHandler} while processing a request.
      */
     public void setAuthenticationAttempted() {
         authnAttempted = true;
@@ -30,14 +30,14 @@ import edu.internet2.middleware.shibboleth.idp.session.AuthenticationMethodInfor
  * certificate or one-time password.
  * 
  * After the handler has authenticated the user it <strong>MUST</strong> bind the user's principal name to the
- * {@link HttpServletRequest} attribute identified by {@link AuthenticationHandler#PRINCIPAL_NAME_KEY}.
+ * {@link HttpServletRequest} attribute identified by {@link LoginHandler#PRINCIPAL_NAME_KEY}.
  * 
  * The handler may bind a {@link Subject} to the attribute identified by {@link #SUBJECT_KEY} if one was created during
  * the authentication process. This Subject is stored in the {@link AuthenticationMethodInformation}, created for this
  * authentication, in the user's session.
  * 
  * The handler may also bind an error message, if an error occurred during authentication to the request attribute
- * identified by {@link AuthenticationHandler#AUTHENTICATION_ERROR_KEY}.
+ * identified by {@link LoginHandler#AUTHENTICATION_ERROR_KEY}.
  * 
  * Finally, the handler must return control to the authentication engine by invoking
  * {@link AuthenticationEngine#returnToAuthenticationEngine(HttpServletRequest, HttpServletResponse)}. After which the
@@ -47,7 +47,7 @@ import edu.internet2.middleware.shibboleth.idp.session.AuthenticationMethodInfor
  * persists past the process of authenticating the user, that is no additional session data may be added and no existing
  * session data may be changed when the handler returns control to the authentication engine.
  */
-public interface AuthenticationHandler {
+public interface LoginHandler {
 
     /** Request attribute to which user's principal name should be bound. */
     public static final String PRINCIPAL_NAME_KEY = "principal";
@@ -94,13 +94,4 @@ public interface AuthenticationHandler {
      * @param httpResponse response to user
      */
     public void login(HttpServletRequest httpRequest, HttpServletResponse httpResponse);
-
-    /**
-     * Logs out the given user from the authentication mechanism represented by this handler.
-     * 
-     * @param request user request
-     * @param response response to user
-     * @param principal principal named as returned during authentication
-     */
-    public void logout(HttpServletRequest request, HttpServletResponse response, String principal);
 }
\ No newline at end of file
@@ -19,15 +19,12 @@ package edu.internet2.middleware.shibboleth.idp.authn.provider;
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import edu.internet2.middleware.shibboleth.idp.authn.AuthenticationHandler;
+import edu.internet2.middleware.shibboleth.idp.authn.LoginHandler;
 
 /**
  * Base class for authentication handlers.
  */
-public abstract class AbstractAuthenticationHandler implements AuthenticationHandler {
+public abstract class AbstractLoginHandler implements LoginHandler {
     
     /** Authentication methods this handler supports. */
     private ArrayList<String> supportedAuthenticationMethods;
@@ -42,7 +39,7 @@ public abstract class AbstractAuthenticationHandler implements AuthenticationHan
     private boolean supportsPassive;
     
     /** Constructor. */
-    protected AbstractAuthenticationHandler(){
+    protected AbstractLoginHandler(){
         supportedAuthenticationMethods = new ArrayList<String>();
     }
     
@@ -92,9 +89,4 @@ public abstract class AbstractAuthenticationHandler implements AuthenticationHan
     public void setSupportsPassive(boolean supported) {
         supportsPassive = supported;
     }
-
-    /** {@inheritDoc} */
-    public void logout(HttpServletRequest request, HttpServletResponse response, String principal) {
-        // logout not yet supported
-    }
 }
\ No newline at end of file
@@ -35,7 +35,7 @@ import org.apache.log4j.Logger;
 import org.joda.time.DateTime;
 
 import edu.internet2.middleware.shibboleth.idp.authn.AuthenticationEngine;
-import edu.internet2.middleware.shibboleth.idp.authn.AuthenticationHandler;
+import edu.internet2.middleware.shibboleth.idp.authn.LoginHandler;
 import edu.internet2.middleware.shibboleth.idp.authn.LoginContext;
 
 /**
@@ -47,10 +47,10 @@ import edu.internet2.middleware.shibboleth.idp.authn.LoginContext;
  * If an Authentication Context Class or DeclRef URI is not specified, it will default to
  * "urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocol".
  */
-public class IPAddressAuthenticationHandler extends AbstractAuthenticationHandler {
+public class IPAddressLoginHandler extends AbstractLoginHandler {
 
     /** Class logger. */
-    private final Logger log = Logger.getLogger(IPAddressAuthenticationHandler.class);
+    private final Logger log = Logger.getLogger(IPAddressLoginHandler.class);
 
     /** The URI of the AuthnContextDeclRef or the AuthnContextClass. */
     private String authnMethodURI = "urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocol";
@@ -81,7 +81,7 @@ public class IPAddressAuthenticationHandler extends AbstractAuthenticationHandle
 
         for (String addr : entries) {
             try {
-                ipList.add(new edu.internet2.middleware.shibboleth.idp.authn.provider.IPAddressAuthenticationHandler.IPEntry(addr));
+                ipList.add(new edu.internet2.middleware.shibboleth.idp.authn.provider.IPAddressLoginHandler.IPEntry(addr));
             } catch (UnknownHostException ex) {
                 log.error("IPAddressHandler: Error parsing entry \"" + addr + "\". Ignoring.");
             }
@@ -133,7 +133,7 @@ public class IPAddressAuthenticationHandler extends AbstractAuthenticationHandle
         boolean ipAllowed = searchIpList(request);
 
         if (ipAllowed) {
-            request.setAttribute(AuthenticationHandler.PRINCIPAL_NAME_KEY, username);
+            request.setAttribute(LoginHandler.PRINCIPAL_NAME_KEY, username);
         }
     }
 
@@ -142,7 +142,7 @@ public class IPAddressAuthenticationHandler extends AbstractAuthenticationHandle
         boolean ipDenied = searchIpList(request);
 
         if (!ipDenied) {
-            request.setAttribute(AuthenticationHandler.PRINCIPAL_NAME_KEY, username);
+            request.setAttribute(LoginHandler.PRINCIPAL_NAME_KEY, username);
         }
     }
 
index 19ff6f0..700bd0d 100644 (file)
@@ -26,7 +26,7 @@ import javax.servlet.http.HttpServletResponse;
 import org.apache.log4j.Logger;
 
 import edu.internet2.middleware.shibboleth.idp.authn.AuthenticationEngine;
-import edu.internet2.middleware.shibboleth.idp.authn.AuthenticationHandler;
+import edu.internet2.middleware.shibboleth.idp.authn.LoginHandler;
 
 /**
  * Extracts the REMOTE_USER and places it in a request attribute to be used by the authentication engine.
@@ -48,7 +48,7 @@ public class RemoteUserAuthServlet extends HttpServlet {
             log.debug("Remote user identified as " + principalName
                             + " returning control back to authentication engine");
         }
-        httpRequest.setAttribute(AuthenticationHandler.PRINCIPAL_NAME_KEY, httpRequest.getRemoteUser());
+        httpRequest.setAttribute(LoginHandler.PRINCIPAL_NAME_KEY, httpRequest.getRemoteUser());
         AuthenticationEngine.returnToAuthenticationEngine(httpRequest, httpResponse);
     }
 }
\ No newline at end of file
@@ -27,10 +27,10 @@ import org.opensaml.util.URLBuilder;
 /**
  * Authentication Handler that redirects to servlet protected by a Web Single-Sign-On system.
  */
-public class RemoteUserAuthenticationHandler extends AbstractAuthenticationHandler {
+public class RemoteUserLoginHandler extends AbstractLoginHandler {
 
     /** Class logger. */
-    private final Logger log = Logger.getLogger(RemoteUserAuthenticationHandler.class);
+    private final Logger log = Logger.getLogger(RemoteUserLoginHandler.class);
 
     /** The URL of the SSO-protected servlet. */
     private String servletURL;
@@ -33,10 +33,10 @@ import org.opensaml.util.URLBuilder;
  * If an Authentication Context Class or DeclRef URI is not specified, it will default to
  * "urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport".
  */
-public class UsernamePasswordAuthenticationHandler extends AbstractAuthenticationHandler {
+public class UsernamePasswordLoginHandler extends AbstractLoginHandler {
 
     /** Class logger. */
-    private final Logger log = Logger.getLogger(UsernamePasswordAuthenticationHandler.class);
+    private final Logger log = Logger.getLogger(UsernamePasswordLoginHandler.class);
 
     /** The URL of the servlet used to perform authentication. */
     private String authenticationServletURL;
@@ -46,7 +46,7 @@ public class UsernamePasswordAuthenticationHandler extends AbstractAuthenticatio
      *
      * @param servletURL URL to the authentication servlet
      */
-    public UsernamePasswordAuthenticationHandler(String servletURL){
+    public UsernamePasswordLoginHandler(String servletURL){
         super();
         setSupportsPassive(false);
         setSupportsForceAuthentication(true);
@@ -35,13 +35,13 @@ import org.opensaml.util.URLBuilder;
 import org.opensaml.xml.util.DatatypeHelper;
 
 import edu.internet2.middleware.shibboleth.idp.authn.AuthenticationEngine;
-import edu.internet2.middleware.shibboleth.idp.authn.AuthenticationHandler;
+import edu.internet2.middleware.shibboleth.idp.authn.LoginHandler;
 
 /**
  * This servlet should be protected by a filter which populates REMOTE_USER. The serlvet will then set the remote user
  * field in a LoginContext.
  */
-public class UsernamePasswordAuthenticationServlet extends HttpServlet {
+public class UsernamePasswordLoginServlet extends HttpServlet {
 
     /** Serial version UID. */
     private static final long serialVersionUID = -572799841125956990L;
@@ -133,8 +133,8 @@ public class UsernamePasswordAuthenticationServlet extends HttpServlet {
             
             Subject subject = jaasLoginCtx.getSubject();
             Principal principal = subject.getPrincipals().iterator().next();
-            request.setAttribute(AuthenticationHandler.PRINCIPAL_NAME_KEY, principal.getName());
-            request.setAttribute(AuthenticationHandler.SUBJECT_KEY, jaasLoginCtx.getSubject());
+            request.setAttribute(LoginHandler.PRINCIPAL_NAME_KEY, principal.getName());
+            request.setAttribute(LoginHandler.SUBJECT_KEY, jaasLoginCtx.getSubject());
 
             return true;
         } catch (LoginException e) {
index 459d3b8..1c07e2b 100644 (file)
@@ -20,7 +20,7 @@ import java.util.List;
 
 import edu.internet2.middleware.shibboleth.common.profile.AbstractErrorHandler;
 import edu.internet2.middleware.shibboleth.common.profile.ProfileHandler;
-import edu.internet2.middleware.shibboleth.idp.authn.AuthenticationHandler;
+import edu.internet2.middleware.shibboleth.idp.authn.LoginHandler;
 
 /**
  * Container for a single profile handler group configuration.
@@ -33,8 +33,8 @@ public class ProfileHandlerGroup {
     /** List of profile handlers for the group. */
     private List<ProfileHandler> profileHandlers;
     
-    /** List of authentication handlers for the group. */
-    private List<AuthenticationHandler> authenticationHandlers;
+    /** List of login handlers for the group. */
+    private List<LoginHandler> loginHandlers;
 
     /**
      * Gets the error handler for the group.
@@ -73,12 +73,12 @@ public class ProfileHandlerGroup {
     }
     
     /**
-     * Gets the authentication handlers for the group.
+     * Gets the login handlers for the group.
      * 
      * @return authentication handlers for the group
      */
-    public List<AuthenticationHandler> getAuthenticationHandlers() {
-        return authenticationHandlers;
+    public List<LoginHandler> getLoginHandlers() {
+        return loginHandlers;
     }
 
     /**
@@ -86,7 +86,7 @@ public class ProfileHandlerGroup {
      * 
      * @param handlers authentication handlers for the group
      */
-    public void setAuthenticationHandlers(List<AuthenticationHandler> handlers) {
-        authenticationHandlers = handlers;
+    public void setLoginHandlers(List<LoginHandler> handlers) {
+        loginHandlers = handlers;
     }
 }
\ No newline at end of file
index 8557322..2847fa1 100644 (file)
@@ -21,8 +21,8 @@ import javax.xml.namespace.QName;
 import edu.internet2.middleware.shibboleth.common.config.BaseSpringNamespaceHandler;
 import edu.internet2.middleware.shibboleth.common.config.profile.JSPErrorHandlerBeanDefinitionParser;
 import edu.internet2.middleware.shibboleth.common.config.profile.VelocityErrorHandlerBeanDefinitionParser;
-import edu.internet2.middleware.shibboleth.idp.config.profile.authn.RemoteUserAuthenticationHandlerBeanDefinitionParser;
-import edu.internet2.middleware.shibboleth.idp.config.profile.authn.UsernamePasswordAuthenticationHandlerBeanDefinitionParser;
+import edu.internet2.middleware.shibboleth.idp.config.profile.authn.RemoteUserLoginHandlerBeanDefinitionParser;
+import edu.internet2.middleware.shibboleth.idp.config.profile.authn.UsernamePasswordLoginHandlerBeanDefinitionParser;
 import edu.internet2.middleware.shibboleth.idp.config.profile.saml1.SAML1AttributeQueryProfileHandlerBeanDefinitionParser;
 import edu.internet2.middleware.shibboleth.idp.config.profile.saml1.ShibbolethSSOProfileHandlerBeanDefinitionParser;
 import edu.internet2.middleware.shibboleth.idp.config.profile.saml2.SAML2AttributeQueryProfileHandlerBeanDefinitionParser;
@@ -65,10 +65,10 @@ public class ProfileHandlerNamespaceHandler extends BaseSpringNamespaceHandler {
         registerBeanDefinitionParser(SAML2SSOProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
                 new SAML2SSOProfileHandlerBeanDefinitionParser());
 
-        registerBeanDefinitionParser(RemoteUserAuthenticationHandlerBeanDefinitionParser.SCHEMA_TYPE,
-                new RemoteUserAuthenticationHandlerBeanDefinitionParser());
+        registerBeanDefinitionParser(RemoteUserLoginHandlerBeanDefinitionParser.SCHEMA_TYPE,
+                new RemoteUserLoginHandlerBeanDefinitionParser());
 
-        registerBeanDefinitionParser(UsernamePasswordAuthenticationHandlerBeanDefinitionParser.SCHEMA_TYPE,
-                new UsernamePasswordAuthenticationHandlerBeanDefinitionParser());
+        registerBeanDefinitionParser(UsernamePasswordLoginHandlerBeanDefinitionParser.SCHEMA_TYPE,
+                new UsernamePasswordLoginHandlerBeanDefinitionParser());
     }
 }
\ No newline at end of file
@@ -31,10 +31,10 @@ import edu.internet2.middleware.shibboleth.idp.config.profile.ProfileHandlerName
 /**
  * Base class for authentication handler definition parsers.
  */
-public abstract class AbstractAuthenticationHandlerBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
+public abstract class AbstractLoginHandlerBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
 
     /** Class logger. */
-    private static Logger log = Logger.getLogger(AbstractAuthenticationHandlerBeanDefinitionParser.class);
+    private static Logger log = Logger.getLogger(AbstractLoginHandlerBeanDefinitionParser.class);
 
     /** {@inheritDoc} */
     protected void doParse(Element config, BeanDefinitionBuilder builder) {
@@ -20,12 +20,12 @@ import java.util.List;
 
 import org.springframework.beans.factory.config.AbstractFactoryBean;
 
-import edu.internet2.middleware.shibboleth.idp.authn.provider.AbstractAuthenticationHandler;
+import edu.internet2.middleware.shibboleth.idp.authn.provider.AbstractLoginHandler;
 
 /**
  * Base class for authentication handler factory beans.
  */
-public abstract class AbstractAuthenticationHandlerFactoryBean extends AbstractFactoryBean {
+public abstract class AbstractLoginHandlerFactoryBean extends AbstractFactoryBean {
 
     /** Authentication methods supported by the handler. */
     private List<String> authenticationMethods;
@@ -74,7 +74,7 @@ public abstract class AbstractAuthenticationHandlerFactoryBean extends AbstractF
      * 
      * @param handler the authentication handler to populate
      */
-    protected void populateHandler(AbstractAuthenticationHandler handler) {
+    protected void populateHandler(AbstractLoginHandler handler) {
         if (authenticationMethods != null) {
             handler.getSupportedAuthenticationMethods().addAll(authenticationMethods);
         }
@@ -27,15 +27,15 @@ import edu.internet2.middleware.shibboleth.idp.config.profile.ProfileHandlerName
 /**
  * Spring bean definition parser for remote user authentication handlers.
  */
-public class RemoteUserAuthenticationHandlerBeanDefinitionParser extends
-        AbstractAuthenticationHandlerBeanDefinitionParser {
+public class RemoteUserLoginHandlerBeanDefinitionParser extends
+        AbstractLoginHandlerBeanDefinitionParser {
     
     /** Schema type. */
     public static final QName SCHEMA_TYPE = new QName(ProfileHandlerNamespaceHandler.NAMESPACE, "RemoteUser");
 
     /** {@inheritDoc} */
     protected Class getBeanClass(Element arg0) {
-        return RemoteUserAuthenticationHandlerFactoryBean.class;
+        return RemoteUserLoginHandlerFactoryBean.class;
     }
 
     /** {@inheritDoc} */
 
 package edu.internet2.middleware.shibboleth.idp.config.profile.authn;
 
-import edu.internet2.middleware.shibboleth.idp.authn.provider.RemoteUserAuthenticationHandler;
+import edu.internet2.middleware.shibboleth.idp.authn.provider.RemoteUserLoginHandler;
 
 /**
- * Spring factory for {@link RemoteUserAuthenticationHandler}.
+ * Spring factory for {@link RemoteUserLoginHandler}.
  */
-public class RemoteUserAuthenticationHandlerFactoryBean extends AbstractAuthenticationHandlerFactoryBean {
+public class RemoteUserLoginHandlerFactoryBean extends AbstractLoginHandlerFactoryBean {
 
     /** Path to protected servlet. */
     private String protectedServletPath;
 
     /** {@inheritDoc} */
     public Class getObjectType() {
-        return RemoteUserAuthenticationHandler.class;
+        return RemoteUserLoginHandler.class;
     }
 
     /**
@@ -51,7 +51,7 @@ public class RemoteUserAuthenticationHandlerFactoryBean extends AbstractAuthenti
 
     /** {@inheritDoc} */
     protected Object createInstance() throws Exception {
-        RemoteUserAuthenticationHandler handler = new RemoteUserAuthenticationHandler();
+        RemoteUserLoginHandler handler = new RemoteUserLoginHandler();
         handler.setServletURL(getProtectedServletPath());
         populateHandler(handler);
         return handler;
@@ -29,8 +29,8 @@ import edu.internet2.middleware.shibboleth.idp.config.profile.ProfileHandlerName
 /**
  * Spring bean definition parser for username/password authentication handlers.
  */
-public class UsernamePasswordAuthenticationHandlerBeanDefinitionParser extends
-        AbstractAuthenticationHandlerBeanDefinitionParser {
+public class UsernamePasswordLoginHandlerBeanDefinitionParser extends
+        AbstractLoginHandlerBeanDefinitionParser {
 
     /** Schema type. */
     public static final QName SCHEMA_TYPE = new QName(ProfileHandlerNamespaceHandler.NAMESPACE, "UsernamePassword");
@@ -40,7 +40,7 @@ public class UsernamePasswordAuthenticationHandlerBeanDefinitionParser extends
 
     /** {@inheritDoc} */
     protected Class getBeanClass(Element element) {
-        return UsernamePasswordAuthenticationHandlerFactoryBean.class;
+        return UsernamePasswordLoginHandlerFactoryBean.class;
     }
 
     /** {@inheritDoc} */
 
 package edu.internet2.middleware.shibboleth.idp.config.profile.authn;
 
-import edu.internet2.middleware.shibboleth.idp.authn.provider.UsernamePasswordAuthenticationHandler;
+import edu.internet2.middleware.shibboleth.idp.authn.provider.UsernamePasswordLoginHandler;
 
 /**
- * Factory bean for {@link UsernamePasswordAuthenticationHandler}s.
+ * Factory bean for {@link UsernamePasswordLoginHandler}s.
  */
-public class UsernamePasswordAuthenticationHandlerFactoryBean extends AbstractAuthenticationHandlerFactoryBean {
+public class UsernamePasswordLoginHandlerFactoryBean extends AbstractLoginHandlerFactoryBean {
 
     /** URL to authentication servlet. */
     private String authenticationServletURL;
@@ -46,7 +46,7 @@ public class UsernamePasswordAuthenticationHandlerFactoryBean extends AbstractAu
 
     /** {@inheritDoc} */
     protected Object createInstance() throws Exception {
-        UsernamePasswordAuthenticationHandler handler = new UsernamePasswordAuthenticationHandler(
+        UsernamePasswordLoginHandler handler = new UsernamePasswordLoginHandler(
                 authenticationServletURL);
 
         populateHandler(handler);
@@ -56,6 +56,6 @@ public class UsernamePasswordAuthenticationHandlerFactoryBean extends AbstractAu
 
     /** {@inheritDoc} */
     public Class getObjectType() {
-        return UsernamePasswordAuthenticationHandler.class;
+        return UsernamePasswordLoginHandler.class;
     }
 }
\ No newline at end of file
index 6006fc6..ad70a3c 100644 (file)
@@ -35,7 +35,7 @@ import edu.internet2.middleware.shibboleth.common.profile.AbstractErrorHandler;
 import edu.internet2.middleware.shibboleth.common.profile.ProfileHandler;
 import edu.internet2.middleware.shibboleth.common.profile.ProfileHandlerManager;
 import edu.internet2.middleware.shibboleth.common.profile.provider.AbstractRequestURIMappedProfileHandler;
-import edu.internet2.middleware.shibboleth.idp.authn.AuthenticationHandler;
+import edu.internet2.middleware.shibboleth.idp.authn.LoginHandler;
 import edu.internet2.middleware.shibboleth.idp.authn.LoginContext;
 
 /**
@@ -54,7 +54,7 @@ public class IdPProfileHandlerManager extends BaseReloadableService implements P
     private Map<String, AbstractRequestURIMappedProfileHandler> profileHandlers;
 
     /** Map of authentication methods to authentication handlers. */
-    private Map<String, AuthenticationHandler> authenticationHandlers;
+    private Map<String, LoginHandler> authenticationHandlers;
 
     /**
      * Constructor. Configuration resources are not monitored for changes.
@@ -64,7 +64,7 @@ public class IdPProfileHandlerManager extends BaseReloadableService implements P
     public IdPProfileHandlerManager(List<Resource> configurations) {
         super(configurations);
         profileHandlers = new HashMap<String, AbstractRequestURIMappedProfileHandler>();
-        authenticationHandlers = new HashMap<String, AuthenticationHandler>();
+        authenticationHandlers = new HashMap<String, LoginHandler>();
     }
 
     /**
@@ -78,7 +78,7 @@ public class IdPProfileHandlerManager extends BaseReloadableService implements P
     public IdPProfileHandlerManager(List<Resource> configurations, Timer timer, long pollingFrequency) {
         super(timer, configurations, pollingFrequency);
         profileHandlers = new HashMap<String, AbstractRequestURIMappedProfileHandler>();
-        authenticationHandlers = new HashMap<String, AuthenticationHandler>();
+        authenticationHandlers = new HashMap<String, LoginHandler>();
     }
 
     /** {@inheritDoc} */
@@ -141,14 +141,14 @@ public class IdPProfileHandlerManager extends BaseReloadableService implements P
      * 
      * @return authentication method URI and handler appropriate for given login context
      */
-    public Pair<String, AuthenticationHandler> getAuthenticationHandler(LoginContext loginContext) {
+    public Pair<String, LoginHandler> getAuthenticationHandler(LoginContext loginContext) {
         if (log.isDebugEnabled()) {
             log.debug(getId() + ": Looking up authentication method for relying party "
                     + loginContext.getRelyingPartyId());
         }
         List<String> requestedMethods = loginContext.getRequestedAuthenticationMethods();
         if (requestedMethods != null) {
-            AuthenticationHandler candidateHandler;
+            LoginHandler candidateHandler;
             for (String requestedMethod : requestedMethods) {
                 if (log.isDebugEnabled()) {
                     log.debug(getId() + ": Checking for authentication handler for method " + requestedMethod
@@ -175,7 +175,7 @@ public class IdPProfileHandlerManager extends BaseReloadableService implements P
                                 + " for relying party " + loginContext.getRelyingPartyId()
                                 + " meets all requirements, using it.");
                     }
-                    return new Pair<String, AuthenticationHandler>(requestedMethod, candidateHandler);
+                    return new Pair<String, LoginHandler>(requestedMethod, candidateHandler);
                 }
             }
         } else {
@@ -191,7 +191,7 @@ public class IdPProfileHandlerManager extends BaseReloadableService implements P
      * 
      * @return registered authentication handlers
      */
-    public Map<String, AuthenticationHandler> getAuthenticationHandlers() {
+    public Map<String, LoginHandler> getAuthenticationHandlers() {
         return authenticationHandlers;
     }
 
@@ -257,15 +257,15 @@ public class IdPProfileHandlerManager extends BaseReloadableService implements P
      * @param newServiceContext newly created application context
      */
     protected void loadNewAuthenticationHandlers(ApplicationContext newServiceContext) {
-        String[] authnBeanNames = newServiceContext.getBeanNamesForType(AuthenticationHandler.class);
+        String[] authnBeanNames = newServiceContext.getBeanNamesForType(LoginHandler.class);
         if (log.isDebugEnabled()) {
             log.debug(getId() + ": Loading " + authnBeanNames.length + " new authentication handlers.");
         }
 
         authenticationHandlers.clear();
-        AuthenticationHandler authnHandler;
+        LoginHandler authnHandler;
         for (String authnBeanName : authnBeanNames) {
-            authnHandler = (AuthenticationHandler) newServiceContext.getBean(authnBeanName);
+            authnHandler = (LoginHandler) newServiceContext.getBean(authnBeanName);
             if (log.isDebugEnabled()) {
                 log.debug(getId() + ": Loading authentication handler of type "
                         + authnHandler.getClass().getName() + " supporting authentication methods: "