in.hocg.sso2.server.sample.UserDetailsServiceImpl Maven / Gradle / Ivy
package in.hocg.sso2.server.sample;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Component;
import java.util.Collections;
/**
* Created by hocgin on 2020/1/9.
* email: [email protected]
*
* @author hocgin
*/
@Component
public class UserDetailsServiceImpl implements org.springframework.security.core.userdetails.UserDetailsService {
@Override
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
return new User(username, "{noop}hocgin", Collections.emptyList());
}
}