Package nu.localhost.testsite.services

Source Code of nu.localhost.testsite.services.DummyUserDetailService

package nu.localhost.testsite.services;

import java.util.Collection;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

public class DummyUserDetailService implements UserDetailsService {

  @Override
  public UserDetails loadUserByUsername(String username)
      throws UsernameNotFoundException {
    return new UserDetails() {
     
      @Override
      public boolean isEnabled() {
        // TODO Auto-generated method stub
        return false;
      }
     
      @Override
      public boolean isCredentialsNonExpired() {
        // TODO Auto-generated method stub
        return false;
      }
     
      @Override
      public boolean isAccountNonLocked() {
        // TODO Auto-generated method stub
        return false;
      }
     
      @Override
      public boolean isAccountNonExpired() {
        // TODO Auto-generated method stub
        return false;
      }
     
      @Override
      public String getUsername() {
        return "test";
      }
     
      @Override
      public String getPassword() {
        return "test";
      }
     
      @Override
      public Collection<? extends GrantedAuthority> getAuthorities() {
        // TODO Auto-generated method stub
        return null;
      }
    };
  }

}
TOP

Related Classes of nu.localhost.testsite.services.DummyUserDetailService

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.