Spring Security Framework

org.springframework.security.userdetails
Interface UserDetailsService

All Known Subinterfaces:
UserDetailsManager
All Known Implementing Classes:
InMemoryDaoImpl, JdbcDaoImpl, JdbcUserDetailsManager, LdapUserDetailsManager, LdapUserDetailsService, UserDetailsServiceWrapper

public interface UserDetailsService

Defines an interface for implementations that wish to provide data access services to the DaoAuthenticationProvider.

The interface requires only one read-only method, which simplifies support of new data access strategies.

Version:
$Id$
Author:
Ben Alex

Method Summary
 UserDetails loadUserByUsername(String username)
          Locates the user based on the username.
 

Method Detail

loadUserByUsername

UserDetails loadUserByUsername(String username)
                               throws UsernameNotFoundException,
                                      DataAccessException
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..

Parameters:
username - the username presented to the DaoAuthenticationProvider
Returns:
a fully populated user record (never null)
Throws:
UsernameNotFoundException - if the user could not be found or the user has no GrantedAuthority
DataAccessException - if user could not be found for a repository-specific reason

Spring Security Framework

Copyright © 2004-2010 SpringSource, Inc. All Rights Reserved.