aboutsummaryrefslogtreecommitdiff
path: root/juick-server-web/src/main/java/com/juick/service/security/NullUserDetailsService.java
blob: 49e9effc94166fba695bec6a9db82dbfc3e26f0c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package com.juick.service.security;

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

/**
 * Created by aalexeev on 11/28/16.
 */
public class NullUserDetailsService implements UserDetailsService {
    @Override
    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
        throw new UsernameNotFoundException(
                "loadUserByUsername called for NullUserDetailsService, user " + username + "can not be found");
    }
}