Skip to content

Commit

Permalink
Clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisClone committed Apr 6, 2020
1 parent 2110b43 commit 3bcd3a6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
@EnableGlobalMethodSecurity(securedEnabled = true, jsr250Enabled = true, prePostEnabled = true)
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
CustomUserDetailsService CustomUserDetailsService;
CustomUserDetailsService customUserDetailsService;

@Autowired
private JwtAuthenticationEntryPoint unauthorizedHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public UserDetails loadUserByUsername(String username)
throws UsernameNotFoundException {
// Let people login with either username or email
Profile profile = profileRepository.findByUsername(username)
// .orElse(() -> Account account = accountRepository.findByEmail(usernameOrEmail))
.orElseThrow(() -> new UsernameNotFoundException("User not found with username : " + username));

return UserPrincipal.create(profile);
Expand Down

0 comments on commit 3bcd3a6

Please sign in to comment.