Announcement Announcement Module
Collapse
No announcement yet.
[3.1] Custom authentication provider not executed Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • [3.1] Custom authentication provider not executed

    Hi,

    I have problem with my custom authentication provider - method loadUserByUsername is not invoked.
    This is my configuration:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans:beans 
      xmlns="http://www.springframework.org/schema/security"
      xmlns:beans="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/beans
              http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
              http://www.springframework.org/schema/security
              http://www.springframework.org/schema/security/spring-security-3.1.xsd">
    
    <http auto-config="true" use-expressions="true" authentication-manager-ref="myam">
      <http-basic />
      <intercept-url pattern="/**"  access="permitAll" />
      <form-login login-page="/llogin.xhtml" />
    </http>
    
    	<authentication-manager id="myam">
    		<authentication-provider user-service-ref="myUserDetailsService" >
    		</authentication-provider>
    	</authentication-manager>
    Code:
    @Service("myUserDetailsService")
    @Transactional(readOnly=true)
    public class UserDetailsServiceImpl implements UserDetailsService {
    	
    	@Autowired
    	IUserService userService;
    
    	@Override
    	public UserDetails loadUserByUsername(String email)
    			throws UsernameNotFoundException {
    		User user = userService.getByEmail(email);
    
    .....

    thanks in advance for any suggestion

  • #2
    ok, its solved.
    The problem was connected with my mvc configuration...

    Comment

    Working...
    X