If one doesn’t need to encode basic auth password @Bean public PasswordEncoder passwordEncoder() { return NoOpPasswordEncoder.getInstance(); } springsecurity