Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Creating our own users with a custom security policy

Pragya Keshap answered on February 15, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • add security headers wordpress

  • Creating our own users with a custom security policy

    0

    @Configuration is Spring’s annotation to signal that this class is a source of bean definitions rather than actual application code. Spring Boot will detect it through its component scanning and automatically add all its bean definitions to the application context.

    UserDetailsService is Spring Security’s interface for defining a source of users. This bean definition, marked with @Bean, creates InMemoryUserDetailsManager.

    Using InMemoryUserDetailsManager, we can then create a couple of users. Each user has a username, a password, and a role. This code fragment also uses the withDefaultPasswordEncoder() method to avoid encoding the password.

    Popularity 1/10 Helpfulness 1/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Feb 15 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.