org.acegisecurity.userdetails.UserDetailsService Maven / Gradle / Ivy
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
*
* Licensed 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
*
* 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 org.acegisecurity.userdetails;
import org.acegisecurity.providers.dao.DaoAuthenticationProvider;
import org.springframework.dao.DataAccessException;
/**
* Defines an interface for implementations that wish to provide data access
* services to the {@link DaoAuthenticationProvider}.
*
*
* The interface requires only one read-only method, which simplifies support
* of new data access strategies.
*
*
* @author Ben Alex
* @version $Id: UserDetailsService.java 1496 2006-05-23 13:38:33Z benalex $
*/
public interface UserDetailsService {
//~ Methods ========================================================================================================
/**
* Locates the user based on the username. In the actual implementation, the search may possibly be case
* insensitive, or case insensitive depending on how the implementaion instance is configured. In this case, the
* UserDetails
object that comes back may have a username that is of a different case than what was
* actually requested..
*
* @param username the username presented to the {@link DaoAuthenticationProvider}
*
* @return a fully populated user record (never null
)
*
* @throws UsernameNotFoundException if the user could not be found or the user has no GrantedAuthority
* @throws DataAccessException if user could not be found for a repository-specific reason
*/
public UserDetails loadUserByUsername(String username)
throws UsernameNotFoundException, DataAccessException;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy