0

I'm trying to learn Spring boot security currently. I want to authorize with database without password encoding. What Configuration is need for this?

1

1 Answer 1

0
        @Autowired
        public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
    // configure AuthenticationManager so that it knows from where to load
    // user for matching credentials
    // Use BCryptPasswordEncoder
            auth.userDetailsService(jwtUserDetailsService).passwordEncoder(passwordEncoder());
        }

        @Bean
        public PasswordEncoder passwordEncoder() {
            return new BCryptPasswordEncoder();
        }

if u need to use password Encoder u just need t add this Bean 
Sign up to request clarification or add additional context in comments.

2 Comments

nooooo! i want to log in without any encoding password, if in db password is "root" when my password is "root".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.