// Path: ki4so-core/src/main/java/com/github/ebnew/ki4so/core/authentication/handlers/AbstractUsernamePasswordAuthenticationHandler.java
// public abstract class AbstractUsernamePasswordAuthenticationHandler extends
// 		AbstractPreAndPostProcessingAuthenticationHandler {
// 
// 	/** Default class to support if one is not supplied. */
// 	private static final Class<KnightNamePasswordCredential> DEFAULT_CLASS = KnightNamePasswordCredential.class;
// 
// 	/** Class that this instance will support. */
// 	private Class<?> classToSupport = DEFAULT_CLASS;
// 
// 	/**
// 	 * Boolean to determine whether to support subclasses of the class to
// 	 * support.
// 	 */
// 	private boolean supportSubClasses = true;
// 
// 	/**
// 	 * PasswordEncoder to be used by subclasses to encode passwords for
// 	 * comparing against a resource.
// 	 */
// 	private PasswordEncoder passwordEncoder = new PlainTextPasswordEncoder();
// 
// 	/**
// 	 * Method automatically handles conversion to UsernamePasswordCredentials
// 	 * and delegates to abstract authenticateUsernamePasswordInternal so
// 	 * subclasses do not need to cast.
// 	 */
// 	protected final boolean doAuthentication(final KnightCredential credential)
// 			throws AuthenticationException {
// 		return authenticateUsernamePasswordInternal((KnightNamePasswordCredential) credential);
// 	}
// 
// 	/**
// 	 * Abstract convenience method that assumes the credentials passed in are a
// 	 * subclass of UsernamePasswordCredentials.
// 	 * 
// 	 * @param credentials
// 	 *            the credentials representing the Username and Password
// 	 *            presented to CAS
// 	 * @return true if the credentials are authentic, false otherwise.
// 	 * @throws AuthenticationException
// 	 *             if authenticity cannot be determined.
// 	 */
// 	protected abstract boolean authenticateUsernamePasswordInternal(
// 			final KnightNamePasswordCredential credential)
// 			throws AuthenticationException;
// 
// 	/**
// 	 * Method to return the PasswordEncoder to be used to encode passwords.
// 	 * 
// 	 * @return the PasswordEncoder associated with this class.
// 	 */
// 	protected final PasswordEncoder getPasswordEncoder() {
// 		return this.passwordEncoder;
// 	}
// 
// 	/**
// 	 * Method to set the class to support.
// 	 * 
// 	 * @param classToSupport
// 	 *            the class we want this handler to support explicitly.
// 	 */
// 	public final void setClassToSupport(final Class<?> classToSupport) {
// 		this.classToSupport = classToSupport;
// 	}
// 
// 	/**
// 	 * Method to set whether this handler will support subclasses of the
// 	 * supported class.
// 	 * 
// 	 * @param supportSubClasses
// 	 *            boolean of whether to support subclasses or not.
// 	 */
// 	public final void setSupportSubClasses(final boolean supportSubClasses) {
// 		this.supportSubClasses = supportSubClasses;
// 	}
// 
// 	/**
// 	 * Sets the PasswordEncoder to be used with this class.
// 	 * 
// 	 * @param passwordEncoder
// 	 *            the PasswordEncoder to use when encoding passwords.
// 	 */
// 	public final void setPasswordEncoder(final PasswordEncoder passwordEncoder) {
// 		this.passwordEncoder = passwordEncoder;
// 	}
// 
// 	/**
// 	 * @return true if the credentials are not null and the credentials class is
// 	 *         equal to the class defined in classToSupport.
// 	 */
// 	public final boolean supports(final KnightCredential credential) {
// 		return credential != null
// 				&& (this.classToSupport.equals(credential.getClass()) || (this.classToSupport
// 						.isAssignableFrom(credential.getClass()))
// 						&& this.supportSubClasses);
// 	}
// }


import com.github.ebnew.ki4so.core.authentication.handlers.AbstractUsernamePasswordAuthenticationHandler;
import javax.sql.DataSource;
import org.springframework.jdbc.core.JdbcTemplate;

/*
 * Licensed to Jasig under one or more contributor license
 * agreements. See the NOTICE file distributed with this work
 * for additional information regarding copyright ownership.
 * Jasig licenses this file to you under the Apache License,
 * Version 2.0 (the "License"); you may not use this file
 * except in compliance with the License.  You may obtain a
 * copy of the License at the following location:
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package com.github.ebnew.ki4so.core.authentication.handlers.jdbc;




/**
 * Abstract class for database authentication handlers.
 * 
 * @author Scott Battaglia
 * @since 3.0.3
 */
public abstract class AbstractJdbcUsernamePasswordAuthenticationHandler extends AbstractUsernamePasswordAuthenticationHandler {

    private JdbcTemplate jdbcTemplate;
    

// Path: ki4so-core/src/main/java/com/github/ebnew/ki4so/core/authentication/handlers/AbstractUsernamePasswordAuthenticationHandler.java
// public abstract class AbstractUsernamePasswordAuthenticationHandler extends
// 		AbstractPreAndPostProcessingAuthenticationHandler {
// 
// 	/** Default class to support if one is not supplied. */
// 	private static final Class<KnightNamePasswordCredential> DEFAULT_CLASS = KnightNamePasswordCredential.class;
// 
// 	/** Class that this instance will support. */
// 	private Class<?> classToSupport = DEFAULT_CLASS;
// 
// 	/**
// 	 * Boolean to determine whether to support subclasses of the class to
// 	 * support.
// 	 */
// 	private boolean supportSubClasses = true;
// 
// 	/**
// 	 * PasswordEncoder to be used by subclasses to encode passwords for
// 	 * comparing against a resource.
// 	 */
// 	private PasswordEncoder passwordEncoder = new PlainTextPasswordEncoder();
// 
// 	/**
// 	 * Method automatically handles conversion to UsernamePasswordCredentials
// 	 * and delegates to abstract authenticateUsernamePasswordInternal so
// 	 * subclasses do not need to cast.
// 	 */
// 	protected final boolean doAuthentication(final KnightCredential credential)
// 			throws AuthenticationException {
// 		return authenticateUsernamePasswordInternal((KnightNamePasswordCredential) credential);
// 	}
// 
// 	/**
// 	 * Abstract convenience method that assumes the credentials passed in are a
// 	 * subclass of UsernamePasswordCredentials.
// 	 * 
// 	 * @param credentials
// 	 *            the credentials representing the Username and Password
// 	 *            presented to CAS
// 	 * @return true if the credentials are authentic, false otherwise.
// 	 * @throws AuthenticationException
// 	 *             if authenticity cannot be determined.
// 	 */
// 	protected abstract boolean authenticateUsernamePasswordInternal(
// 			final KnightNamePasswordCredential credential)
// 			throws AuthenticationException;
// 
// 	/**
// 	 * Method to return the PasswordEncoder to be used to encode passwords.
// 	 * 
// 	 * @return the PasswordEncoder associated with this class.
// 	 */
// 	protected final PasswordEncoder getPasswordEncoder() {
// 		return this.passwordEncoder;
// 	}
// 
// 	/**
// 	 * Method to set the class to support.
// 	 * 
// 	 * @param classToSupport
// 	 *            the class we want this handler to support explicitly.
// 	 */
// 	public final void setClassToSupport(final Class<?> classToSupport) {
// 		this.classToSupport = classToSupport;
// 	}
// 
// 	/**
// 	 * Method to set whether this handler will support subclasses of the
// 	 * supported class.
// 	 * 
// 	 * @param supportSubClasses
// 	 *            boolean of whether to support subclasses or not.
// 	 */
// 	public final void setSupportSubClasses(final boolean supportSubClasses) {
// 		this.supportSubClasses = supportSubClasses;
// 	}
// 
// 	/**
// 	 * Sets the PasswordEncoder to be used with this class.
// 	 * 
// 	 * @param passwordEncoder
// 	 *            the PasswordEncoder to use when encoding passwords.
// 	 */
// 	public final void setPasswordEncoder(final PasswordEncoder passwordEncoder) {
// 		this.passwordEncoder = passwordEncoder;
// 	}
// 
// 	/**
// 	 * @return true if the credentials are not null and the credentials class is
// 	 *         equal to the class defined in classToSupport.
// 	 */
// 	public final boolean supports(final KnightCredential credential) {
// 		return credential != null
// 				&& (this.classToSupport.equals(credential.getClass()) || (this.classToSupport
// 						.isAssignableFrom(credential.getClass()))
// 						&& this.supportSubClasses);
// 	}
// }


// Path: ki4so-jdbc/src/main/java/com/github/ebnew/ki4so/core/authentication/handlers/jdbc/AbstractJdbcUsernamePasswordAuthenticationHandler.java
import com.github.ebnew.ki4so.core.authentication.handlers.AbstractUsernamePasswordAuthenticationHandler;
import javax.sql.DataSource;
import org.springframework.jdbc.core.JdbcTemplate;

/*
 * Licensed to Jasig under one or more contributor license
 * agreements. See the NOTICE file distributed with this work
 * for additional information regarding copyright ownership.
 * Jasig licenses this file to you under the Apache License,
 * Version 2.0 (the "License"); you may not use this file
 * except in compliance with the License.  You may obtain a
 * copy of the License at the following location:
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package com.github.ebnew.ki4so.core.authentication.handlers.jdbc;




/**
 * Abstract class for database authentication handlers.
 * 
 * @author Scott Battaglia
 * @since 3.0.3
 */
public abstract class AbstractJdbcUsernamePasswordAuthenticationHandler extends AbstractUsernamePasswordAuthenticationHandler {

    private JdbcTemplate jdbcTemplate;
    

    private DataSource dataSource;
